home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / What's New / Development Kits (Disc 1) / • What was new 6⁄97 / Sample Code / Toolbox / FinderDragPro / MoreFiles 1.4.3 Stuff / MoreFilesExtras.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-23  |  99.6 KB  |  2,811 lines  |  [TEXT/MPS ]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    A collection of useful high-level File Manager routines.
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support Emeritus
  7. **
  8. **    File:        MoreFilesExtras.h
  9. **
  10. **    Copyright © 1992-1996 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __MOREFILESEXTRAS__
  23. #define __MOREFILESEXTRAS__
  24.  
  25. #include <Types.h>
  26. #include <Files.h>
  27.  
  28. #include "PascalElim.h"
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. /*****************************************************************************/
  35.  
  36. /*
  37. **    Macros to get information out of GetVolParmsInfoBuffer
  38. */
  39.  
  40. #define    isNetworkVolume(volParms)    ((volParms).vMServerAdr != 0)
  41. #define    hasLimitFCBs(volParms)        (((volParms).vMAttrib & (1L << bLimitFCBs)) != 0)
  42. #define    hasLocalWList(volParms)        (((volParms).vMAttrib & (1L << bLocalWList)) != 0)
  43. #define    hasNoMiniFndr(volParms)        (((volParms).vMAttrib & (1L << bNoMiniFndr)) != 0)
  44. #define hasNoVNEdit(volParms)        (((volParms).vMAttrib & (1L << bNoVNEdit)) != 0)
  45. #define hasNoLclSync(volParms)        (((volParms).vMAttrib & (1L << bNoLclSync)) != 0)
  46. #define hasTrshOffLine(volParms)    (((volParms).vMAttrib & (1L << bTrshOffLine)) != 0)
  47. #define hasNoSwitchTo(volParms)        (((volParms).vMAttrib & (1L << bNoSwitchTo)) != 0)
  48. #define hasNoDeskItems(volParms)    (((volParms).vMAttrib & (1L << bNoDeskItems)) != 0)
  49. #define hasNoBootBlks(volParms)        (((volParms).vMAttrib & (1L << bNoBootBlks)) != 0)
  50. #define hasAccessCntl(volParms)        (((volParms).vMAttrib & (1L << bAccessCntl)) != 0)
  51. #define hasNoSysDir(volParms)        (((volParms).vMAttrib & (1L << bNoSysDir)) != 0)
  52. #define hasExtFSVol(volParms)        (((volParms).vMAttrib & (1L << bHasExtFSVol)) != 0)
  53. #define hasOpenDeny(volParms)        (((volParms).vMAttrib & (1L << bHasOpenDeny)) != 0)
  54. #define hasCopyFile(volParms)        (((volParms).vMAttrib & (1L << bHasCopyFile)) != 0)
  55. #define hasMoveRename(volParms)        (((volParms).vMAttrib & (1L << bHasMoveRename)) != 0)
  56. #define hasDesktopMgr(volParms)        (((volParms).vMAttrib & (1L << bHasDesktopMgr)) != 0)
  57. #define hasShortName(volParms)        (((volParms).vMAttrib & (1L << bHasShortName)) != 0)
  58. #define hasFolderLock(volParms)        (((volParms).vMAttrib & (1L << bHasFolderLock)) != 0)
  59. #define hasPersonalAccessPrivileges(volParms) \
  60.         (((volParms).vMAttrib & (1L << bHasPersonalAccessPrivileges)) != 0)
  61. #define hasUserGroupList(volParms)    (((volParms).vMAttrib & (1L << bHasUserGroupList)) != 0)
  62. #define hasCatSearch(volParms)        (((volParms).vMAttrib & (1L << bHasCatSearch)) != 0)
  63. #define hasFileIDs(volParms)        (((volParms).vMAttrib & (1L << bHasFileIDs)) != 0)
  64. #define hasBTreeMgr(volParms)        (((volParms).vMAttrib & (1L << bHasBTreeMgr)) != 0)
  65. #define hasBlankAccessPrivileges(volParms) \
  66.         (((volParms).vMAttrib & (1L << bHasBlankAccessPrivileges)) != 0)
  67.  
  68. /*****************************************************************************/
  69.  
  70.  
  71. /*
  72. **    Bit masks and macros to get common information out of ioACUser returned
  73. **    by PBGetCatInfo (remember to clear ioACUser before calling PBGetCatInfo
  74. **    since some file systems don't bother to set this field).
  75. **
  76. **    Use the GetDirAccessRestrictions or FSpGetDirAccessRestrictions
  77. **    functions to retrieve the ioACUser access restrictions byte for
  78. **    a folder.
  79. **
  80. **    Note:    The access restriction byte returned by PBGetCatInfo is the
  81. **            2's complement of the user's privileges byte returned in
  82. **            ioACAccess by PBHGetDirAccess.
  83. */
  84.  
  85. enum
  86. {
  87.     /* bits defined in ioACUser */
  88.     acUserNoSeeFoldersMask    = 0x01,
  89.     acUserNoSeeFilesMask    = 0x02,
  90.     acUserNoMakeChangesMask    = 0x04,
  91.     acUserNotOwnerMask        = 0x80,
  92.     
  93.     /* mask for just the access restriction bits */
  94.     acUserAccessMask        = 0x07,
  95.     
  96.     /* common access privilege settings */
  97.     acUserFull                = 0x00,                        /* no access restiction bits on */
  98.     acUserNone                = acUserAccessMask,            /* all access restiction bits on */
  99.     acUserDropBox            = acUserNoSeeFoldersMask + acUserNoSeeFilesMask, /* make changes, but not see files or folders */
  100.     acUserBulletinBoard        = acUserNoMakeChangesMask    /* see files and folders, but not make changes */
  101. };
  102.  
  103. /* Macros for testing ioACUser bits */
  104. #define    userIsOwner(ioACUser)    \
  105.         (((ioACUser) & acUserNotOwnerMask) == 0)
  106. #define    userHasFullAccess(ioACUser)    \
  107.         (((ioACUser) & (acUserAccessMask)) == acUserFull)
  108. #define    userHasDropBoxAccess(ioACUser)    \
  109.         (((ioACUser) & acUserAccessMask) == acUserDropBox)
  110. #define    userHasBulletinBoard(ioACUser)    \
  111.         (((ioACUser) & acUserAccessMask) == acUserBulletinBoard)
  112. #define    userHasNoAccess(ioACUser)        \
  113.         (((ioACUser) & acUserAccessMask) == acUserNone)
  114.  
  115. /*****************************************************************************/
  116.  
  117. /*
  118. **    Deny mode permissions for use with the HOpenAware, HOpenRFAware,
  119. **    FSpOpenAware, and FSpOpenRFAware functions.
  120. */
  121.  
  122. enum
  123. {
  124.     dmNone            = 0x0000,
  125.     dmNoneDenyRd    = 0x0010,
  126.     dmNoneDenyWr    = 0x0020,
  127.     dmNoneDenyRdWr    = 0x0030,
  128.     dmRd            = 0x0001,    /* Single writer, multiple readers; the readers */
  129.     dmRdDenyRd        = 0x0011,
  130.     dmRdDenyWr        = 0x0021,    /* Browsing - equivalent to fsRdPerm */
  131.     dmRdDenyRdWr    = 0x0031,
  132.     dmWr            = 0x0002,
  133.     dmWrDenyRd        = 0x0012,
  134.     dmWrDenyWr        = 0x0022,
  135.     dmWrDenyRdWr    = 0x0032,
  136.     dmRdWr            = 0x0003,    /* Shared access - equivalent to fsRdWrShPerm */
  137.     dmRdWrDenyRd    = 0x0013,
  138.     dmRdWrDenyWr    = 0x0023,    /* Single writer, multiple readers; the writer */
  139.     dmRdWrDenyRdWr    = 0x0033    /* Exclusive access - equivalent to fsRdWrPerm */
  140. };
  141.     
  142. /*****************************************************************************/
  143.  
  144. #if PRAGMA_ALIGN_SUPPORTED
  145. #pragma options align=mac68k
  146. #endif
  147.  
  148. /*
  149. **    For those times where you need to use more than one kind of File Manager parameter
  150. **    block but don't feel like wasting stack space, here's a parameter block you can reuse.
  151. */
  152.  
  153. union UniversalFMPB
  154. {
  155.     ParamBlockRec    PB;
  156.     CInfoPBRec        ciPB;
  157.     DTPBRec            dtPB;
  158.     HParamBlockRec    hPB;
  159.     CMovePBRec        cmPB;
  160.     WDPBRec            wdPB;
  161.     FCBPBRec        fcbPB;
  162. };
  163. typedef union UniversalFMPB UniversalFMPB;
  164. typedef UniversalFMPB *UniversalFMPBPtr, **UniversalFMPBHandle;
  165.  
  166.  
  167. /*
  168. **    Used by GetUGEntries to return user or group lists
  169. */
  170.  
  171. struct UGEntry
  172. {
  173.     short    objType;    /* object type: -1 = group; 0 = user */
  174.     long    objID;        /* the user or group ID */
  175.     Str31    name;        /* the user or group name */
  176. };
  177. typedef struct UGEntry UGEntry;
  178. typedef UGEntry *UGEntryPtr, **UGEntryHandle;
  179.  
  180.  
  181. typedef unsigned char Str8[9];
  182.  
  183.  
  184. /*
  185. **    I use the following record instead of the AFPVolMountInfo structure in Files.h
  186. */
  187.  
  188. struct MyAFPVolMountInfo
  189. {
  190.     short length;                /* length of this record */
  191.     VolumeType media;            /* type of media, always AppleShareMediaType */
  192.     short flags;                /* 0 = normal mount; set bit 0 to inhibit greeting messages */
  193.     char nbpInterval;            /* NBP interval parameter; 7 is a good choice */
  194.     char nbpCount;                /* NBP count parameter; 5 is a good choice */
  195.     short uamType;                /* User Authentication Method */
  196.     short zoneNameOffset;        /* offset from start of record to zoneName */
  197.     short serverNameOffset;        /* offset from start of record to serverName */
  198.     short volNameOffset;        /* offset from start of record to volName */
  199.     short userNameOffset;        /* offset from start of record to userName */
  200.     short userPasswordOffset;    /* offset from start of record to userPassword */
  201.     short volPasswordOffset;    /* offset from start of record to volPassword */
  202.     Str31 zoneName;                /* server's AppleTalk zone name */                    
  203.     Str31 serverName;            /* server name */                    
  204.     Str27 volName;                /* volume name */                    
  205.     Str31 userName;                /* user name (zero length Pascal string for guest) */
  206.     Str8 userPassword;            /* user password (zero length Pascal string if no user password) */                    
  207.     char filler1;                /* to word align volPassword */
  208.     Str8 volPassword;            /* volume password (zero length Pascal string if no volume password) */                    
  209.     char filler2;                /* to end record on word boundry */
  210. };
  211. typedef struct MyAFPVolMountInfo MyAFPVolMountInfo;
  212. typedef MyAFPVolMountInfo *MyAFPVolMountInfoPtr, **MyAFPVolMountInfoHandle;
  213.  
  214. #if PRAGMA_ALIGN_SUPPORTED
  215. #pragma options align=reset
  216. #endif
  217.  
  218. /*****************************************************************************/
  219.  
  220. pascal    void    TruncPString(StringPtr destination,
  221.                              StringPtr source,
  222.                              short maxLength);
  223. /*    ¶ International friendly string truncate routine.
  224.     The TruncPString function copies up to maxLength characters from
  225.     the source Pascal string to the destination Pascal string. TruncPString
  226.     ensures that the truncated string ends on a single-byte character, or on
  227.     the last byte of a multi-byte character.
  228.     
  229.     destination        output:    destination Pascal string.
  230.     source            input:    source Pascal string.
  231.     maxLength        output:    The maximum allowable length of the destination
  232.                             string.
  233. */
  234.  
  235. /*****************************************************************************/
  236.  
  237. pascal    Ptr    GetTempBuffer(long buffReqSize,
  238.                           long *buffActSize);
  239. /*    ¶ Allocate a temporary copy or search buffer.
  240.     The GetTempBuffer function allocates a temporary buffer for file system
  241.     operations which is at least 1024 bytes (1K) and a multiple of
  242.     1024 bytes.
  243.     
  244.     buffReqSize        input:    Size you'd like the buffer to be.
  245.     buffActSize        output:    Size of buffer allocated.
  246.     function result    output:    Pointer to memory allocated or nil if no memory
  247.                             was available. The caller is responsible for
  248.                             disposing of this buffer with DisposePtr.
  249. */
  250.  
  251. /*****************************************************************************/
  252.  
  253. pascal    OSErr    GetVolumeInfoNoName(StringPtr pathname,
  254.                                     short vRefNum,
  255.                                     HParmBlkPtr pb);
  256. /*    ¶ Call PBHGetVInfoSync ignoring returned name.
  257.     GetVolumeInfoNoName uses pathname and vRefNum to call PBHGetVInfoSync
  258.     in cases where the returned volume name is not needed by the caller.
  259.     The pathname and vRefNum parameters are not touched, and the pb
  260.     parameter is initialized by PBHGetVInfoSync except that ioNamePtr in
  261.     the parameter block is always returned as NULL (since it might point
  262.     to GetVolumeInfoNoName's local variable tempPathname).
  263.  
  264.     I noticed using this code in several places, so here it is once.
  265.     This reduces the code size of MoreFiles.
  266.  
  267.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  268.                         partial pathname, it is ignored. A full pathname to a
  269.                         volume must end with a colon character (:).
  270.     vRefNum        input:    Volume specification (volume reference number, working
  271.                         directory number, drive number, or 0).
  272.     pb            input:    A pointer to HParamBlockRec.
  273.                 output:    The parameter block as filled in by PBHGetVInfoSync
  274.                         except that ioNamePtr will always be NULL.
  275.     
  276.     Result Codes
  277.         noErr                0        No error
  278.         nsvErr                -35        No such volume
  279.         paramErr            -50        No default volume, or pb was NULL
  280. */
  281.  
  282. /*****************************************************************************/
  283.  
  284. pascal    OSErr GetCatInfoNoName(short vRefNum,
  285.                                long dirID,
  286.                                StringPtr name,
  287.                                CInfoPBPtr pb);
  288. /*    ¶ Call PBGetCatInfoSync ignoring returned name.
  289.     GetCatInfoNoName uses vRefNum, dirID and name to call PBGetCatInfoSync
  290.     in cases where the returned object is not needed by the caller.
  291.     The vRefNum, dirID and name parameters are not touched, and the pb
  292.     parameter is initialized by PBGetCatInfoSync except that ioNamePtr in
  293.     the parameter block is always returned as NULL (since it might point
  294.     to GetCatInfoNoName's local variable tempName).
  295.  
  296.     I noticed using this code in several places, so here it is once.
  297.     This reduces the code size of MoreFiles.
  298.  
  299.     vRefNum            input:    Volume specification.
  300.     dirID            input:    Directory ID.
  301.     name            input:    Pointer to object name, or nil when dirID
  302.                             specifies a directory that's the object.
  303.     pb                input:    A pointer to CInfoPBRec.
  304.                     output:    The parameter block as filled in by
  305.                             PBGetCatInfoSync except that ioNamePtr will
  306.                             always be NULL.
  307.     
  308.     Result Codes
  309.         noErr                0        No error
  310.         nsvErr                -35        No such volume
  311.         ioErr                -36        I/O error
  312.         bdNamErr            -37        Bad filename
  313.         fnfErr                -43        File not found
  314.         paramErr            -50        No default volume
  315.         dirNFErr            -120    Directory not found or incomplete pathname
  316.         afpAccessDenied        -5000    User does not have the correct access
  317.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  318.         
  319. */
  320.  
  321. /*****************************************************************************/
  322.  
  323. pascal    OSErr    DetermineVRefNum(StringPtr pathname,
  324.                                  short vRefNum,
  325.                                  short *realVRefNum);
  326. /*    ¶ Determine the real volume reference number.
  327.     The DetermineVRefNum function determines the volume reference number of
  328.     a volume from a pathname, a volume specification, or a combination
  329.     of the two.
  330.     WARNING: Volume names on the Macintosh are *not* unique -- Multiple
  331.     mounted volumes can have the same name. For this reason, the use of a
  332.     volume name or full pathname to identify a specific volume may not
  333.     produce the results you expect.  If more than one volume has the same
  334.     name and a volume name or full pathname is used, the File Manager
  335.     currently uses the first volume it finds with a matching name in the
  336.     volume queue.
  337.  
  338.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  339.                         partial pathname, it is ignored. A full pathname to a
  340.                         volume must end with a colon character (:).
  341.     vRefNum        input:    Volume specification (volume reference number, working
  342.                         directory number, drive number, or 0).
  343.     realVRefNum    output:    The real volume reference number.
  344.     
  345.     Result Codes
  346.         noErr                0        No error
  347.         nsvErr                -35        No such volume
  348.         paramErr            -50        No default volume
  349. */
  350.  
  351. /*****************************************************************************/
  352.  
  353. pascal    OSErr    HGetVInfo(short volReference,
  354.                           StringPtr volName,
  355.                           short *vRefNum,
  356.                           unsigned long *freeBytes,
  357.                           unsigned long *totalBytes);
  358. /*    ¶ Get information about a mounted volume.
  359.     The HGetVInfo function returns the name, volume reference number,
  360.     available space (in bytes), and total space (in bytes) for the
  361.     specified volume. You can specify the volume by providing its drive
  362.     number, volume reference number, or 0 for the default volume.
  363.     This routine is compatible with volumes up to 4 gigabytes.
  364.     
  365.     volReference    input:    The drive number, volume reference number,
  366.                             or 0 for the default volume.
  367.     volName            input:    A pointer to a buffer (minimum Str27) where
  368.                             the volume name is to be returned or must
  369.                             be nil.
  370.                     output:    The volume name.
  371.     vRefNum            output:    The volume reference number.
  372.     freeBytes        output:    The number of free bytes on the volume.
  373.                             freeBytes is an unsigned long value.
  374.     totalBytes        output:    The total number of bytes on the volume.
  375.                             totalBytes is an unsigned long value.
  376.     
  377.     Result Codes
  378.         noErr                0        No error
  379.         nsvErr                -35        No such volume
  380.         paramErr            -50        No default volume
  381.     
  382.     __________
  383.     
  384.     Also see:    XGetVInfo
  385. */
  386.  
  387. /*****************************************************************************/
  388.  
  389. pascal    OSErr    XGetVInfo(short volReference,
  390.                           StringPtr volName,
  391.                           short *vRefNum,
  392.                           UnsignedWide *freeBytes,
  393.                           UnsignedWide *totalBytes);
  394. /*    ¶ Get extended information about a mounted volume.
  395.     The XGetVInfo function returns the name, volume reference number,
  396.     available space (in bytes), and total space (in bytes) for the
  397.     specified volume. You can specify the volume by providing its drive
  398.     number, volume reference number, or 0 for the default volume.
  399.     This routine is compatible with volumes up to 2 terabytes.
  400.     
  401.     volReference    input:    The drive number, volume reference number,
  402.                             or 0 for the default volume.
  403.     volName            input:    A pointer to a buffer (minimum Str27) where
  404.                             the volume name is to be returned or must
  405.                             be nil.
  406.                     output:    The volume name.
  407.     vRefNum            output:    The volume reference number.
  408.     freeBytes        output:    The number of free bytes on the volume.
  409.                             freeBytes is an UnsignedWide value.
  410.     totalBytes        output:    The total number of bytes on the volume.
  411.                             totalBytes is an UnsignedWide value.
  412.     
  413.     Result Codes
  414.         noErr                0        No error
  415.         nsvErr                -35        No such volume
  416.         paramErr            -50        No default volume
  417.     
  418.     __________
  419.     
  420.     Also see:    HGetVInfo
  421. */
  422.  
  423. /*****************************************************************************/
  424.  
  425. pascal    OSErr    CheckVolLock(StringPtr pathname,
  426.                              short vRefNum);
  427. /*    ¶ Determine if a volume is locked.
  428.     The CheckVolLock function determines if a volume is locked - either by
  429.     hardware or by software. If CheckVolLock returns noErr, then the volume
  430.     is not locked.
  431.  
  432.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  433.                         partial pathname, it is ignored. A full pathname to a
  434.                         volume must end with a colon character (:).
  435.     vRefNum        input:    Volume specification (volume reference number, working
  436.                         directory number, drive number, or 0).
  437.     
  438.     Result Codes
  439.         noErr                0        No error - volume not locked
  440.         nsvErr                -35        No such volume
  441.         wPrErr                -44        Volume locked by hardware
  442.         vLckdErr            -46        Volume locked by software
  443.         paramErr            -50        No default volume
  444. */
  445.  
  446. /*****************************************************************************/
  447.  
  448. pascal    OSErr GetDriverName(short driverRefNum,
  449.                             Str255 driverName);
  450. /*    ¶ Get a device driver's name.
  451.     The GetDriverName function returns a device driver's name.
  452.  
  453.     driverRefNum    input:    The driver reference number.
  454.     driverName        output:    The driver's name.
  455.     
  456.     Result Codes
  457.         noErr                0        No error
  458.         badUnitErr            -21        Bad driver reference number
  459. */
  460.  
  461. /*****************************************************************************/
  462.  
  463. pascal    OSErr    FindDrive(StringPtr pathname,
  464.                           short vRefNum,
  465.                           DrvQElPtr *driveQElementPtr);
  466. /*    ¶ Find a volume's drive queue element in the drive queue.
  467.     The FindDrive function returns a pointer to a mounted volume's
  468.     drive queue element.
  469.  
  470.     pathName            input:    Pointer to a full pathname or nil. If you
  471.                                 pass in a partial pathname, it is ignored.
  472.                                 A full pathname to a volume must end with
  473.                                 a colon character (:).
  474.     vRefNum                input:    Volume specification (volume reference
  475.                                 number, working directory number, drive
  476.                                 number, or 0).
  477.     driveQElementPtr    output:    Pointer to a volume's drive queue element
  478.                                 in the drive queue. DO NOT change the
  479.                                 DrvQEl.
  480.     
  481.     Result Codes
  482.         noErr                0        No error
  483.         nsvErr                -35        No such volume
  484.         paramErr            -50        No default volume
  485.         nsDrvErr            -56        No such drive
  486. */
  487.  
  488. /*****************************************************************************/
  489.  
  490. pascal    OSErr    GetDiskBlocks(StringPtr pathname,
  491.                               short vRefNum,
  492.                               unsigned long *numBlocks);
  493. /*    ¶ Return the number of physical disk blocks on a disk drive.
  494.     The GetDiskBlocks function returns the number of physical disk
  495.     blocks on a disk drive. NOTE: This is not the same as volume
  496.     allocation blocks!
  497.  
  498.     pathName    input:    Pointer to a full pathname or nil. If you
  499.                         pass in a partial pathname, it is ignored.
  500.                         A full pathname to a volume must end with
  501.                         a colon character (:).
  502.     vRefNum        input:    Volume specification (volume reference
  503.                         number, working directory number, drive
  504.                         number, or 0).
  505.     numBlocks    output:    The number of physical disk blocks on the disk drive.
  506.     
  507.     Result Codes
  508.         noErr                0        No error
  509.         nsvErr                -35        No such volume
  510.         paramErr            -50        No default volume, driver reference
  511.                                     number is zero, ReturnFormatList
  512.                                     returned zero blocks, DriveStatus
  513.                                     returned an unknown value, or
  514.                                     driveQElementPtr->qType is unknown
  515.         nsDrvErr            -56        No such drive
  516.         statusErr            –18        Driver does not respond to this
  517.                                     status request
  518.         badUnitErr            –21        Driver reference number does not
  519.                                     match unit table
  520.         unitEmptyErr        –22        Driver reference number specifies
  521.                                     a nil handle in unit table
  522.         abortErr            –27        Request aborted by KillIO
  523.         notOpenErr            –28        Driver not open
  524. */
  525.  
  526. /*****************************************************************************/
  527.  
  528. pascal    OSErr    UnmountAndEject(StringPtr pathname,
  529.                                 short vRefNum);
  530. /*    ¶ Unmount and eject a volume.
  531.     The UnmountAndEject function unmounts and ejects a volume. The volume
  532.     is ejected only if it is ejectable and not already ejected.
  533.     
  534.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  535.                         partial pathname, it is ignored. A full pathname to a
  536.                         volume must end with a colon character (:).
  537.     vRefNum        input:    Volume specification (volume reference number, working
  538.                         directory number, drive number, or 0).
  539.     
  540.     Result Codes
  541.         noErr                0        No error
  542.         nsvErr                -35        No such volume
  543.         ioErr                -36        I/O error
  544.         bdNamErr            -37        Bad volume name
  545.         fBsyErr                -47        One or more files are open
  546.         paramErr            -50        No default volume
  547.         nsDrvErr            -56        No such drive
  548.         extFSErr            -58        External file system error - no file
  549.                                     system claimed this call.
  550. */
  551.  
  552. /*****************************************************************************/
  553.  
  554. pascal    OSErr    OnLine(FSSpecPtr volumes,
  555.                        short reqVolCount,
  556.                        short *actVolCount,
  557.                        short *volIndex);
  558. /*    ¶ Return the list of volumes currently mounted.
  559.     The OnLine function returns the list of volumes currently mounted in
  560.     an array of FSSpec records.
  561.     
  562.     A noErr result indicates that the volumes array was filled
  563.     (actVolCount == reqVolCount) and there may be additional volumes
  564.     mounted. A nsvErr result indicates that the end of the volume list
  565.     was found and actVolCount volumes were actually found this time.
  566.  
  567.     volumes        input:    Pointer to array of FSSpec where the volume list
  568.                         is returned.
  569.     reqVolCount    input:    Maximum number of volumes to return    (the number of
  570.                         elements in the volumes array).
  571.     actVolCount    output: The number of volumes actually returned.
  572.     volIndex    input:    The current volume index position. Set to 1 to
  573.                         start with the first volume.
  574.                 output:    The volume index position to get the next volume.
  575.                         Pass this value the next time you call OnLine to
  576.                         start where you left off.
  577.     
  578.     Result Codes
  579.         noErr                0        No error, but there are more volumes
  580.                                     to list
  581.         nsvErr                -35        No more volumes to be listed
  582.         paramErr            -50        volIndex was <= 0
  583. */
  584.  
  585. /*****************************************************************************/
  586.  
  587. pascal    OSErr SetDefault(short newVRefNum,
  588.                          long newDirID,
  589.                          short *oldVRefNum,
  590.                          long *oldDirID);
  591. /*    ¶ Set the default volume before making Standard I/O requests.
  592.     The SetDefault function sets the default volume and directory to the
  593.     volume specified by newVRefNum and the directory specified by newDirID.
  594.     The current default volume reference number and directory ID are
  595.     returned in oldVRefNum and oldDir and must be used to restore the
  596.     default volume and directory to their previous state *as soon as
  597.     possible* with the RestoreDefault function. These two functions are
  598.     designed to be used as a wrapper around Standard I/O routines where
  599.     the location of the file is implied to be the default volume and
  600.     directory. In other words, this is how you should use these functions:
  601.     
  602.         error = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);
  603.         if ( error == noErr )
  604.         {
  605.             // call the Stdio functions like remove, rename, tmpfile,
  606.             // fopen, freopen, etc. or non-ANSI extensions like
  607.             // fdopen,fsetfileinfo, -- create, open, unlink, etc. here!
  608.             
  609.             error = RestoreDefault(oldVRefNum, oldDirID);
  610.         }
  611.     
  612.     By using these functions as a wrapper, you won't need to open a working
  613.     directory (because SetDefault and RestoreDefault use HSetVol) and you
  614.     won't have to worry about the effects of using HSetVol (documented in
  615.     Technical Note "FL 11 - PBHSetVol is Dangerous" and in the
  616.     Inside Macintosh: Files book in the description of the HSetVol and 
  617.     PBHSetVol functions) because the default volume/directory is restored
  618.     before giving up control to code that might be affected by HSetVol.
  619.     
  620.     newVRefNum    input:    Volume specification (volume reference number,
  621.                         working directory number, drive number, or 0) of
  622.                         the new default volume.
  623.     newDirID    input:    Directory ID of the new default directory.
  624.     oldVRefNum    output: The volume specification to save for use with
  625.                         RestoreDefault.
  626.     oldDirID    output:    The directory ID to save for use with
  627.                         RestoreDefault.
  628.     
  629.     Result Codes
  630.         noErr                0        No error
  631.         nsvErr                -35        No such volume
  632.         bdNamErr            -37        Bad volume name
  633.         fnfErr                -43        Directory not found
  634.         paramErr            -50        No default volume
  635.         afpAccessDenied        -5000    User does not have access to the directory
  636.     
  637.     __________
  638.     
  639.     Also see:    RestoreDefault
  640. */
  641.  
  642. /*****************************************************************************/
  643.  
  644. pascal    OSErr RestoreDefault(short oldVRefNum,
  645.                              long oldDirID);
  646. /*    ¶ Restore the default volume after making Standard C I/O requests.
  647.     The RestoreDefault function restores the default volume and directory
  648.     to the volume specified by oldVRefNum and the directory specified by 
  649.     oldDirID. The oldVRefNum and oldDirID parameters were previously
  650.     obtained from the SetDefault function. These two functions are designed
  651.     to be used as a wrapper around Standard C I/O routines where the
  652.     location of the file is implied to be the default volume and directory.
  653.     In other words, this is how you should use these functions:
  654.     
  655.         error = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);
  656.         if ( error == noErr )
  657.         {
  658.             // call the Stdio functions like remove, rename, tmpfile,
  659.             // fopen, freopen, etc. or non-ANSI extensions like
  660.             // fdopen,fsetfileinfo, -- create, open, unlink, etc. here!
  661.             
  662.             error = RestoreDefault(oldVRefNum, oldDirID);
  663.         }
  664.     
  665.     By using these functions as a wrapper, you won't need to open a working
  666.     directory (because SetDefault and RestoreDefault use HSetVol) and you
  667.     won't have to worry about the effects of using HSetVol (documented in
  668.     Technical Note "FL 11 - PBHSetVol is Dangerous" and in the
  669.     Inside Macintosh: Files book in the description of the HSetVol and 
  670.     PBHSetVol functions) because the default volume/directory is restored
  671.     before giving up control to code that might be affected by HSetVol.
  672.     
  673.     oldVRefNum    input: The volume specification to restore.
  674.     oldDirID    input:    The directory ID to restore.
  675.     
  676.     Result Codes
  677.         noErr                0        No error
  678.         nsvErr                -35        No such volume
  679.         bdNamErr            -37        Bad volume name
  680.         fnfErr                -43        Directory not found
  681.         paramErr            -50        No default volume
  682.         rfNumErr            -51        Bad working directory reference number
  683.         afpAccessDenied        -5000    User does not have access to the directory
  684.     
  685.     __________
  686.     
  687.     Also see:    SetDefault
  688. */
  689.  
  690. /*****************************************************************************/
  691.  
  692. pascal    OSErr GetDInfo(short vRefNum,
  693.                        long dirID,
  694.                        StringPtr name,
  695.                        DInfo *fndrInfo);
  696. /*    ¶ Get the finder information for a directory.
  697.     The GetDInfo function gets the finder information for a directory.
  698.  
  699.     vRefNum            input:    Volume specification.
  700.     dirID            input:    Directory ID.
  701.     name            input:    Pointer to object name, or nil when dirID
  702.                             specifies a directory that's the object.
  703.     fndrInfo        output:    If the object is a directory, then its DInfo.
  704.     
  705.     Result Codes
  706.         noErr                0        No error
  707.         nsvErr                -35        No such volume
  708.         ioErr                -36        I/O error
  709.         bdNamErr            -37        Bad filename
  710.         fnfErr                -43        File not found
  711.         paramErr            -50        No default volume
  712.         dirNFErr            -120    Directory not found or incomplete pathname
  713.         afpAccessDenied        -5000    User does not have the correct access
  714.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  715.         
  716.     __________
  717.     
  718.     Also see:    FSpGetDInfo, FSpGetFInfoCompat
  719. */
  720.  
  721. /*****************************************************************************/
  722.  
  723. pascal    OSErr FSpGetDInfo(const FSSpec *spec,
  724.                           DInfo *fndrInfo);
  725. /*    ¶ Get the finder information for a directory.
  726.     The FSpGetDInfo function gets the finder information for a directory.
  727.  
  728.     spec        input:    An FSSpec record specifying the directory.
  729.     fndrInfo    output:    If the object is a directory, then its DInfo.
  730.     
  731.     Result Codes
  732.         noErr                0        No error
  733.         nsvErr                -35        No such volume
  734.         ioErr                -36        I/O error
  735.         bdNamErr            -37        Bad filename
  736.         fnfErr                -43        File not found
  737.         paramErr            -50        No default volume
  738.         dirNFErr            -120    Directory not found or incomplete pathname
  739.         afpAccessDenied        -5000    User does not have the correct access
  740.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  741.         
  742.     __________
  743.     
  744.     Also see:    FSpGetFInfoCompat, GetDInfo
  745. */
  746.  
  747. /*****************************************************************************/
  748.  
  749. pascal    OSErr SetDInfo(short vRefNum,
  750.                        long dirID,
  751.                        StringPtr name,
  752.                        const DInfo *fndrInfo);
  753. /*    ¶ Set the finder information for a directory.
  754.     The SetDInfo function sets the finder information for a directory.
  755.  
  756.     vRefNum            input:    Volume specification.
  757.     dirID            input:    Directory ID.
  758.     name            input:    Pointer to object name, or nil when dirID
  759.                             specifies a directory that's the object.
  760.     fndrInfo        input:    The DInfo.
  761.     
  762.     Result Codes
  763.         noErr                0        No error
  764.         nsvErr                -35        No such volume
  765.         ioErr                -36        I/O error
  766.         bdNamErr            -37        Bad filename
  767.         fnfErr                -43        File not found
  768.         fLckdErr            -45        File is locked
  769.         vLckdErr            -46        Volume is locked or read-only
  770.         paramErr            -50        No default volume
  771.         dirNFErr            -120    Directory not found or incomplete pathname
  772.         afpAccessDenied        -5000    User does not have the correct access
  773.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  774.     
  775.     __________
  776.     
  777.     Also see:    FSpSetDInfo, FSpSetFInfoCompat
  778. */
  779.  
  780. /*****************************************************************************/
  781.  
  782. pascal    OSErr FSpSetDInfo(const FSSpec *spec,
  783.                           const DInfo *fndrInfo);
  784. /*    ¶ Set the finder information for a directory.
  785.     The FSpSetDInfo function sets the finder information for a directory.
  786.  
  787.     spec        input:    An FSSpec record specifying the directory.
  788.     fndrInfo    input:    The DInfo.
  789.     
  790.     Result Codes
  791.         noErr                0        No error
  792.         nsvErr                -35        No such volume
  793.         ioErr                -36        I/O error
  794.         bdNamErr            -37        Bad filename
  795.         fnfErr                -43        File not found
  796.         fLckdErr            -45        File is locked
  797.         vLckdErr            -46        Volume is locked or read-only
  798.         paramErr            -50        No default volume
  799.         dirNFErr            -120    Directory not found or incomplete pathname
  800.         afpAccessDenied        -5000    User does not have the correct access
  801.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  802.     
  803.     __________
  804.     
  805.     Also see:    FSpSetFInfoCompat, SetDInfo
  806. */
  807.  
  808. /*****************************************************************************/
  809.  
  810. #if OLDROUTINENAMES
  811. #define    GetDirID(vRefNum, dirID, name, theDirID, isDirectory)    \
  812.         GetDirectoryID(vRefNum, dirID, name, theDirID, isDirectory)
  813. #endif
  814.  
  815. pascal    OSErr    GetDirectoryID(short vRefNum,
  816.                                long dirID,
  817.                                StringPtr name,
  818.                                long *theDirID,
  819.                                Boolean *isDirectory);
  820. /*    ¶ Get the directory ID number of the directory specified.
  821.     The GetDirectoryID function gets the directory ID number of the
  822.     directory specified.  If a file is specified, then the parent
  823.     directory of the file is returned and isDirectory is false.  If
  824.     a directory is specified, then that directory's ID number is
  825.     returned and isDirectory is true.
  826.     WARNING: Volume names on the Macintosh are *not* unique -- Multiple
  827.     mounted volumes can have the same name. For this reason, the use of a
  828.     volume name or full pathname to identify a specific volume may not
  829.     produce the results you expect.  If more than one volume has the same
  830.     name and a volume name or full pathname is used, the File Manager
  831.     currently uses the first volume it finds with a matching name in the
  832.     volume queue.
  833.     
  834.     vRefNum            input:    Volume specification.
  835.     dirID            input:    Directory ID.
  836.     name            input:    Pointer to object name, or nil when dirID
  837.                             specifies a directory that's the object.
  838.     theDirID        output:    If the object is a file, then its parent directory
  839.                             ID. If the object is a directory, then its ID.
  840.     isDirectory        output:    True if object is a directory; false if
  841.                             object is a file.
  842.     
  843.     Result Codes
  844.         noErr                0        No error
  845.         nsvErr                -35        No such volume
  846.         ioErr                -36        I/O error
  847.         bdNamErr            -37        Bad filename
  848.         fnfErr                -43        File not found
  849.         paramErr            -50        No default volume
  850.         dirNFErr            -120    Directory not found or incomplete pathname
  851.         afpAccessDenied        -5000    User does not have the correct access
  852.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  853. */
  854.  
  855. /*****************************************************************************/
  856.  
  857. #if OLDROUTINENAMES
  858. #define    DirIDFromFSSpec(spec, theDirID, isDirectory)    \
  859.         FSpGetDirectoryID(spec, theDirID, isDirectory)
  860. #endif
  861.  
  862. pascal    OSErr    FSpGetDirectoryID(const FSSpec *spec,
  863.                                   long *theDirID,
  864.                                   Boolean *isDirectory);
  865. /*    ¶ Get the directory ID number of a directory.
  866.     The FSpGetDirectoryID function gets the directory ID number of the
  867.     directory specified by spec. If spec is to a file, then the parent
  868.     directory of the file is returned and isDirectory is false.  If
  869.     spec is to a directory, then that directory's ID number is
  870.     returned and isDirectory is true.
  871.     
  872.     spec            input:    An FSSpec record specifying the directory.
  873.     theDirID        output:    The directory ID.
  874.     isDirectory        output:    True if object is a directory; false if
  875.                             object is a file.
  876.     
  877.     Result Codes
  878.         noErr                0        No error
  879.         nsvErr                -35        No such volume
  880.         ioErr                -36        I/O error
  881.         bdNamErr            -37        Bad filename
  882.         fnfErr                -43        File not found
  883.         paramErr            -50        No default volume
  884.         dirNFErr            -120    Directory not found or incomplete pathname
  885.         afpAccessDenied        -5000    User does not have the correct access
  886.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  887. */
  888.  
  889. /*****************************************************************************/
  890.  
  891. pascal    OSErr    GetDirName(short vRefNum,
  892.                            long dirID,
  893.                            Str31 name);
  894. /*    ¶ Get the name of a directory from its directory ID.
  895.     The GetDirName function gets the name of a directory from its
  896.     directory ID.
  897.  
  898.     vRefNum        input:    Volume specification.
  899.     dirID        input:    Directory ID.
  900.     name        output:    Points to a Str31 where the directory name is to be
  901.                         returned.
  902.     
  903.     Result Codes
  904.         noErr                0        No error
  905.         nsvErr                -35        No such volume
  906.         ioErr                -36        I/O error
  907.         bdNamErr            -37        Bad filename
  908.         fnfErr                -43        File not found
  909.         paramErr            -50        No default volume or
  910.                                     name parameter was NULL
  911.         dirNFErr            -120    Directory not found or incomplete pathname
  912.         afpAccessDenied        -5000    User does not have the correct access
  913.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  914. */
  915.  
  916. /*****************************************************************************/
  917.  
  918. pascal    OSErr    GetIOACUser(short vRefNum,
  919.                             long dirID,
  920.                             StringPtr name,
  921.                             SInt8 *ioACUser);
  922. /*    ¶ Get a directory's access restrictions byte.
  923.     GetIOACUser returns a directory's access restrictions byte.
  924.     Use the masks and macro defined in MoreFilesExtras to check for
  925.     specific access priviledges.
  926.     
  927.     vRefNum        input:    Volume specification.
  928.     dirID        input:    Directory ID.
  929.     name        input:    Pointer to object name, or nil when dirID
  930.                         specifies a directory that's the object.
  931.     ioACUser    output:    The access restriction byte
  932.     
  933.     Result Codes
  934.         noErr                0        No error
  935.         nsvErr                -35        No such volume
  936.         ioErr                -36        I/O error
  937.         bdNamErr            -37        Bad filename
  938.         fnfErr                -43        File not found
  939.         paramErr            -50        No default volume
  940.         dirNFErr            -120    Directory not found or incomplete pathname
  941.         afpAccessDenied        -5000    User does not have the correct access
  942.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  943. */
  944.  
  945. /*****************************************************************************/
  946.  
  947. pascal    OSErr    FSpGetIOACUser(const FSSpec *spec,
  948.                                SInt8 *ioACUser);
  949. /*    ¶ Get a directory's access restrictions byte.
  950.     FSpGetIOACUser returns a directory's access restrictions byte.
  951.     Use the masks and macro defined in MoreFilesExtras to check for
  952.     specific access priviledges.
  953.     
  954.     spec        input:    An FSSpec record specifying the directory.
  955.     ioACUser    output:    The access restriction byte
  956.     
  957.     Result Codes
  958.         noErr                0        No error
  959.         nsvErr                -35        No such volume
  960.         ioErr                -36        I/O error
  961.         bdNamErr            -37        Bad filename
  962.         fnfErr                -43        File not found
  963.         paramErr            -50        No default volume
  964.         dirNFErr            -120    Directory not found or incomplete pathname
  965.         afpAccessDenied        -5000    User does not have the correct access
  966.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  967. */
  968.  
  969. /*****************************************************************************/
  970.  
  971. pascal    OSErr    GetParentID(short vRefNum,
  972.                             long dirID,
  973.                             StringPtr name,
  974.                             long *parID);
  975. /*    ¶ Get the parent directory ID number of the specified object.
  976.     The GetParentID function gets the parent directory ID number of the
  977.     specified object.
  978.     
  979.     vRefNum        input:    Volume specification.
  980.     dirID        input:    Directory ID.
  981.     name        input:    Pointer to object name, or nil when dirID specifies
  982.                         a directory that's the object.
  983.     parID        output:    The parent directory ID of the specified object.
  984.     
  985.     Result Codes
  986.         noErr                0        No error
  987.         nsvErr                -35        No such volume
  988.         ioErr                -36        I/O error
  989.         bdNamErr            -37        Bad filename
  990.         fnfErr                -43        File not found
  991.         paramErr            -50        No default volume
  992.         dirNFErr            -120    Directory not found or incomplete pathname
  993.         afpAccessDenied        -5000    User does not have the correct access
  994.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  995. */
  996.  
  997. /*****************************************************************************/
  998.  
  999. pascal    OSErr    GetFilenameFromPathname(ConstStr255Param pathname,
  1000.                                         Str255 filename);
  1001. /*    ¶ Get the object name from the end of a full or partial pathname.
  1002.     The GetFilenameFromPathname function gets the file (or directory) name
  1003.     from the end of a full or partial pathname. Returns notAFileErr if the
  1004.     pathname is nil, the pathname is empty, or the pathname cannot refer to
  1005.     a filename (with a noErr result, the pathname could still refer to a
  1006.     directory).
  1007.     
  1008.     pathname    input:    A full or partial pathname.
  1009.     filename    output:    The file (or directory) name.
  1010.     
  1011.     Result Codes
  1012.         noErr                0        No error
  1013.         notAFileErr            -1302    The pathname is nil, the pathname
  1014.                                     is empty, or the pathname cannot refer
  1015.                                     to a filename
  1016.     
  1017.     __________
  1018.     
  1019.     See also:    GetObjectLocation.
  1020. */
  1021.  
  1022. /*****************************************************************************/
  1023.  
  1024. pascal    OSErr    GetObjectLocation(short vRefNum,
  1025.                                   long dirID,
  1026.                                   StringPtr pathname,
  1027.                                   short *realVRefNum,
  1028.                                   long *realParID,
  1029.                                   Str255 realName,
  1030.                                   Boolean *isDirectory);
  1031. /*    ¶ Get a file system object's location.
  1032.     The GetObjectLocation function gets a file system object's location -
  1033.     that is, its real volume reference number, real parent directory ID,
  1034.     and name. While we're at it, determine if the object is a file or directory.
  1035.     If GetObjectLocation returns fnfErr, then the location information
  1036.     returned is valid, but it describes an object that doesn't exist.
  1037.     You can use the location information for another operation, such as
  1038.     creating a file or directory.
  1039.     
  1040.     vRefNum        input:    Volume specification.
  1041.     dirID        input:    Directory ID.
  1042.     pathname    input:    Pointer to object name, or nil when dirID specifies
  1043.                         a directory that's the object.
  1044.     realVRefNum    output:    The real volume reference number.
  1045.     realParID    output:    The parent directory ID of the specified object.
  1046.     realName    output:    The name of the specified object (the case of the
  1047.                         object name may not be the same as the object's
  1048.                         catalog entry on disk - since the Macintosh file
  1049.                         system is not case sensitive, it shouldn't matter).
  1050.     isDirectory    output:    True if object is a directory; false if object
  1051.                         is a file.
  1052.     
  1053.     Result Codes
  1054.         noErr                0        No error
  1055.         nsvErr                -35        No such volume
  1056.         ioErr                -36        I/O error
  1057.         bdNamErr            -37        Bad filename
  1058.         fnfErr                -43        File not found
  1059.         paramErr            -50        No default volume
  1060.         dirNFErr            -120    Directory not found or incomplete pathname
  1061.         notAFileErr            -1302    The pathname is nil, the pathname
  1062.                                     is empty, or the pathname cannot refer
  1063.                                     to a filename
  1064.         afpAccessDenied        -5000    User does not have the correct access
  1065.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1066.     
  1067.     __________
  1068.     
  1069.     See also:    FSMakeFSSpecCompat
  1070. */
  1071.  
  1072. /*****************************************************************************/
  1073.  
  1074. pascal    OSErr    GetDirItems(short vRefNum,
  1075.                             long dirID,
  1076.                             StringPtr name,
  1077.                             Boolean getFiles,
  1078.                             Boolean getDirectories,
  1079.                             FSSpecPtr items,
  1080.                             short reqItemCount,
  1081.                             short *actItemCount,
  1082.                             short *itemIndex);
  1083. /*    ¶ Return a list of items in a directory.
  1084.     The GetDirItems function returns a list of items in the specified
  1085.     directory in an array of FSSpec records. File, subdirectories, or
  1086.     both can be returned in the list.
  1087.     
  1088.     A noErr result indicates that the items array was filled
  1089.     (actItemCount == reqItemCount) and there may be additional items
  1090.     left in the directory. A fnfErr result indicates that the end of
  1091.     the directory list was found and actItemCount items were actually
  1092.     found this time.
  1093.  
  1094.     vRefNum            input:    Volume specification.
  1095.     dirID            input:    Directory ID.
  1096.     name            input:    Pointer to object name, or nil when dirID
  1097.                             specifies a directory that's the object.
  1098.     getFiles        input:    Pass true to have files added to the items list.
  1099.     getDirectories    input:    Pass true to have directories added to the
  1100.                             items list.
  1101.     items            input:    Pointer to array of FSSpec where the item list
  1102.                             is returned.
  1103.     reqItemCount    input:    Maximum number of items to return (the number
  1104.                             of elements in the items array).
  1105.     actItemCount    output: The number of items actually returned.
  1106.     itemIndex        input:    The current item index position. Set to 1 to
  1107.                             start with the first item in the directory.
  1108.                     output:    The item index position to get the next item.
  1109.                             Pass this value the next time you call
  1110.                             GetDirItems to start where you left off.
  1111.     
  1112.     Result Codes
  1113.         noErr                0        No error, but there are more items
  1114.                                     to list
  1115.         nsvErr                -35        No such volume
  1116.         ioErr                -36        I/O error
  1117.         bdNamErr            -37        Bad filename
  1118.         fnfErr                -43        File not found, there are no more items
  1119.                                     to be listed.
  1120.         paramErr            -50        No default volume or itemIndex was <= 0
  1121.         dirNFErr            -120    Directory not found or incomplete pathname
  1122.         afpAccessDenied        -5000    User does not have the correct access
  1123.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1124. */
  1125.  
  1126. /*****************************************************************************/
  1127.  
  1128. pascal    OSErr    DeleteDirectoryContents(short vRefNum,
  1129.                                          long dirID,
  1130.                                         StringPtr name);
  1131. /*    ¶ Delete the contents of a directory.
  1132.     The DeleteDirectoryContents function deletes the contents of a directory.
  1133.     All files and subdirectories in the specified directory are deleted.
  1134.     If a locked file or directory is encountered, it is unlocked and then
  1135.     deleted.  If any unexpected errors are encountered,
  1136.     DeleteDirectoryContents quits and returns to the caller.
  1137.     
  1138.     vRefNum    input:    Volume specification.
  1139.     dirID    input:    Directory ID.
  1140.     name    input:    Pointer to directory name, or nil when dirID specifies
  1141.                     a directory that's the object.
  1142.     
  1143.     Result Codes
  1144.         noErr                0        No error
  1145.         nsvErr                -35        No such volume
  1146.         ioErr                -36        I/O error
  1147.         bdNamErr            -37        Bad filename
  1148.         fnfErr                -43        File not found
  1149.         wPrErr                -44        Hardware volume lock    
  1150.         fLckdErr            -45        File is locked    
  1151.         vLckdErr            -46        Software volume lock    
  1152.         fBsyErr                -47        File busy, directory not empty, or working directory control block open    
  1153.         paramErr            -50        No default volume
  1154.         dirNFErr            -120    Directory not found or incomplete pathname
  1155.         afpAccessDenied        -5000    User does not have the correct access
  1156.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1157.     
  1158.     __________
  1159.     
  1160.     Also see:    DeleteDirectory
  1161. */
  1162.  
  1163. /*****************************************************************************/
  1164.  
  1165. pascal    OSErr    DeleteDirectory(short vRefNum,
  1166.                                 long dirID,
  1167.                                 StringPtr name);
  1168. /*    ¶ Delete a directory and its contents.
  1169.     The DeleteDirectory function deletes a directory and its contents.
  1170.     All files and subdirectories in the specified directory are deleted.
  1171.     If a locked file or directory is encountered, it is unlocked and then
  1172.     deleted.  After deleting the directories contents, the directory is
  1173.     deleted. If any unexpected errors are encountered, DeleteDirectory
  1174.     quits and returns to the caller.
  1175.     
  1176.     vRefNum    input:    Volume specification.
  1177.     dirID    input:    Directory ID.
  1178.     name    input:    Pointer to directory name, or nil when dirID specifies
  1179.                     a directory that's the object.
  1180.     
  1181.     Result Codes
  1182.         noErr                0        No error
  1183.         nsvErr                -35        No such volume
  1184.         ioErr                -36        I/O error
  1185.         bdNamErr            -37        Bad filename
  1186.         fnfErr                -43        File not found
  1187.         wPrErr                -44        Hardware volume lock
  1188.         fLckdErr            -45        File is locked
  1189.         vLckdErr            -46        Software volume lock
  1190.         fBsyErr                -47        File busy, directory not empty, or working directory control block open    
  1191.         paramErr            -50        No default volume
  1192.         dirNFErr            -120    Directory not found or incomplete pathname
  1193.         afpAccessDenied        -5000    User does not have the correct access
  1194.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1195.     
  1196.     __________
  1197.     
  1198.     Also see:    DeleteDirectoryContents
  1199. */
  1200.  
  1201. /*****************************************************************************/
  1202.  
  1203. pascal    OSErr    CheckObjectLock(short vRefNum,
  1204.                                 long dirID,
  1205.                                 StringPtr name);
  1206. /*    ¶ Determine if a file or directory is locked.
  1207.     The CheckObjectLock function determines if a file or directory is locked.
  1208.     If CheckObjectLock returns noErr, then the file or directory
  1209.     is not locked. If CheckObjectLock returns fLckdErr, the it is locked.
  1210.     
  1211.     vRefNum    input:    Volume specification.
  1212.     dirID    input:    Directory ID.
  1213.     name    input:    Pointer to object name, or nil when dirID specifies
  1214.                     a directory that's the object.
  1215.     
  1216.     Result Codes
  1217.         noErr                0        No error
  1218.         nsvErr                -35        No such volume
  1219.         ioErr                -36        I/O error
  1220.         bdNamErr            -37        Bad filename
  1221.         fnfErr                -43        File not found
  1222.         fLckdErr            -45        File is locked
  1223.         paramErr            -50        No default volume
  1224.         dirNFErr            -120    Directory not found or incomplete pathname
  1225.         afpAccessDenied        -5000    User does not have the correct access
  1226.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1227.     
  1228.     __________
  1229.     
  1230.     Also see:    FSpCheckObjectLock
  1231. */
  1232.  
  1233. /*****************************************************************************/
  1234.  
  1235. pascal    OSErr    FSpCheckObjectLock(const FSSpec *spec);
  1236. /*    ¶ Determine if a file or directory is locked.
  1237.     The FSpCheckObjectLock function determines if a file or directory is locked.
  1238.     If FSpCheckObjectLock returns noErr, then the file or directory
  1239.     is not locked.
  1240.     
  1241.     spec    input:    An FSSpec record specifying the object.
  1242.     
  1243.     Result Codes
  1244.         noErr                0        No error
  1245.         nsvErr                -35        No such volume
  1246.         ioErr                -36        I/O error
  1247.         bdNamErr            -37        Bad filename
  1248.         fnfErr                -43        File not found
  1249.         fLckdErr            -45        File is locked
  1250.         paramErr            -50        No default volume
  1251.         dirNFErr            -120    Directory not found or incomplete pathname
  1252.         afpAccessDenied        -5000    User does not have the correct access
  1253.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1254.     
  1255.     __________
  1256.     
  1257.     Also see:    CheckObjectLock
  1258. */
  1259.  
  1260. /*****************************************************************************/
  1261.  
  1262. pascal    OSErr    GetFileSize(short vRefNum,
  1263.                             long dirID,
  1264.                             ConstStr255Param fileName,
  1265.                             long *dataSize,
  1266.                             long *rsrcSize);
  1267. /*    ¶ Get the logical sizes of a file's forks.
  1268.     The GetFileSize function returns the logical size of a file's
  1269.     data and resource fork.
  1270.     
  1271.     vRefNum        input:    Volume specification.
  1272.     dirID        input:    Directory ID.
  1273.     name        input:    The name of the file.
  1274.     dataSize    output:    The number of bytes in the file's data fork.
  1275.     rsrcSize    output:    The number of bytes in the file's resource fork.
  1276.     
  1277.     Result Codes
  1278.         noErr                0        No error
  1279.         nsvErr                -35        No such volume
  1280.         ioErr                -36        I/O error
  1281.         bdNamErr            -37        Bad filename
  1282.         fnfErr                -43        File not found
  1283.         paramErr            -50        No default volume
  1284.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  1285.         afpAccessDenied        -5000    User does not have the correct access
  1286.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1287.     
  1288.     __________
  1289.     
  1290.     See also:    FSpGetFileSize
  1291. */
  1292.  
  1293. /*****************************************************************************/
  1294.  
  1295. pascal    OSErr    FSpGetFileSize(const FSSpec *spec,
  1296.                                long *dataSize,
  1297.                                long *rsrcSize);
  1298. /*    ¶ Get the logical sizes of a file's forks.
  1299.     The FSpGetFileSize function returns the logical size of a file's
  1300.     data and resource fork.
  1301.     
  1302.     spec        input:    An FSSpec record specifying the file.
  1303.     dataSize    output:    The number of bytes in the file's data fork.
  1304.     rsrcSize    output:    The number of bytes in the file's resource fork.
  1305.     
  1306.     Result Codes
  1307.         noErr                0        No error
  1308.         nsvErr                -35        No such volume
  1309.         ioErr                -36        I/O error
  1310.         bdNamErr            -37        Bad filename
  1311.         fnfErr                -43        File not found
  1312.         paramErr            -50        No default volume
  1313.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  1314.         afpAccessDenied        -5000    User does not have the correct access
  1315.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1316.     
  1317.     __________
  1318.     
  1319.     See also:    GetFileSize
  1320. */
  1321.  
  1322. /*****************************************************************************/
  1323.  
  1324. pascal    OSErr    BumpDate(short vRefNum,
  1325.                          long dirID,
  1326.                          StringPtr name);
  1327. /*    ¶ Update the modification date of a file or directory.
  1328.     The BumpDate function changes the modification date of a file or
  1329.     directory to the current date/time.  If the modification date is already
  1330.     equal to the current date/time, then add one second to the
  1331.     modification date.
  1332.     
  1333.     vRefNum    input:    Volume specification.
  1334.     dirID    input:    Directory ID.
  1335.     name    input:    Pointer to object name, or nil when dirID specifies
  1336.                     a directory that's the object.
  1337.     
  1338.     Result Codes
  1339.         noErr                0        No error
  1340.         nsvErr                -35        No such volume
  1341.         ioErr                -36        I/O error
  1342.         bdNamErr            -37        Bad filename
  1343.         fnfErr                -43        File not found
  1344.         fLckdErr            -45        File is locked
  1345.         vLckdErr            -46        Volume is locked or read-only
  1346.         paramErr            -50        No default volume
  1347.         dirNFErr            -120    Directory not found or incomplete pathname
  1348.         afpAccessDenied        -5000    User does not have the correct access
  1349.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1350.     
  1351.     __________
  1352.     
  1353.     See also:    FSpBumpDate
  1354. */
  1355.  
  1356. /*****************************************************************************/
  1357.  
  1358. pascal    OSErr    FSpBumpDate(const FSSpec *spec);
  1359. /*    ¶ Update the modification date of a file or directory.
  1360.     The FSpBumpDate function changes the modification date of a file or
  1361.     directory to the current date/time.  If the modification date is already
  1362.     equal to the current date/time, then add one second to the
  1363.     modification date.
  1364.     
  1365.     spec    input:    An FSSpec record specifying the object.
  1366.     
  1367.     Result Codes
  1368.         noErr                0        No error
  1369.         nsvErr                -35        No such volume
  1370.         ioErr                -36        I/O error
  1371.         bdNamErr            -37        Bad filename
  1372.         fnfErr                -43        File not found
  1373.         fLckdErr            -45        File is locked
  1374.         vLckdErr            -46        Volume is locked or read-only
  1375.         paramErr            -50        No default volume
  1376.         dirNFErr            -120    Directory not found or incomplete pathname
  1377.         afpAccessDenied        -5000    User does not have the correct access
  1378.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1379.     
  1380.     __________
  1381.     
  1382.     See also:    BumpDate
  1383. */
  1384.  
  1385. /*****************************************************************************/
  1386.  
  1387. pascal    OSErr    ChangeCreatorType(short vRefNum,
  1388.                                   long dirID,
  1389.                                   ConstStr255Param name,
  1390.                                   OSType creator,
  1391.                                   OSType fileType);
  1392. /*    ¶ Change the creator or file type of a file.
  1393.     The ChangeCreatorType function changes the creator or file type of a file.
  1394.  
  1395.     vRefNum        input:    Volume specification.
  1396.     dirID        input:    Directory ID.
  1397.     name        input:    The name of the file.
  1398.     creator        input:    The new creator type or 0x00000000 to leave
  1399.                         the creator type alone.
  1400.     fileType    input:    The new file type or 0x00000000 to leave the
  1401.                         file type alone.
  1402.     
  1403.     Result Codes
  1404.         noErr                0        No error
  1405.         nsvErr                -35        No such volume
  1406.         ioErr                -36        I/O error
  1407.         bdNamErr            -37        Bad filename
  1408.         fnfErr                -43        File not found
  1409.         fLckdErr            -45        File is locked
  1410.         vLckdErr            -46        Volume is locked or read-only
  1411.         paramErr            -50        No default volume
  1412.         dirNFErr            -120    Directory not found or incomplete pathname
  1413.         notAFileErr            -1302    Name was not a file
  1414.         afpAccessDenied        -5000    User does not have the correct access
  1415.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1416.     
  1417.     __________
  1418.     
  1419.     See also:    FSpChangeCreatorType
  1420. */
  1421.  
  1422. /*****************************************************************************/
  1423.  
  1424. pascal    OSErr    FSpChangeCreatorType(const FSSpec *spec,
  1425.                                      OSType creator,
  1426.                                      OSType fileType);
  1427. /*    ¶ Change the creator or file type of a file.
  1428.     The FSpChangeCreatorType function changes the creator or file type of a file.
  1429.  
  1430.     spec        input:    An FSSpec record specifying the file.
  1431.     creator        input:    The new creator type or 0x00000000 to leave
  1432.                         the creator type alone.
  1433.     fileType    input:    The new file type or 0x00000000 to leave the
  1434.                         file type alone.
  1435.     
  1436.     Result Codes
  1437.         noErr                0        No error
  1438.         nsvErr                -35        No such volume
  1439.         ioErr                -36        I/O error
  1440.         bdNamErr            -37        Bad filename
  1441.         fnfErr                -43        File not found
  1442.         fLckdErr            -45        File is locked
  1443.         vLckdErr            -46        Volume is locked or read-only
  1444.         paramErr            -50        No default volume
  1445.         dirNFErr            -120    Directory not found or incomplete pathname
  1446.         notAFileErr            -1302    Name was not a file
  1447.         afpAccessDenied        -5000    User does not have the correct access
  1448.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1449.     
  1450.     __________
  1451.     
  1452.     See also:    ChangeCreatorType
  1453. */
  1454.  
  1455. /*****************************************************************************/
  1456.  
  1457. pascal    OSErr    ChangeFDFlags(short vRefNum,
  1458.                               long dirID,
  1459.                               StringPtr name,
  1460.                               Boolean    setBits,
  1461.                               unsigned short flagBits);
  1462. /*    ¶ Set or clear Finder Flag bits.
  1463.     The ChangeFDFlags function sets or clears Finder Flag bits in the
  1464.     fdFlags field of a file or directory's FInfo record.
  1465.     
  1466.     vRefNum        input:    Volume specification.
  1467.     dirID        input:    Directory ID.
  1468.     name        input:    Pointer to object name, or nil when dirID specifies
  1469.                         a directory that's the object.
  1470.     setBits        input:    If true, then set the bits specified in flagBits.
  1471.                         If false, then clear the bits specified in flagBits.
  1472.     flagBits    input:    The flagBits parameter specifies which Finder Flag
  1473.                         bits to set or clear. If a bit in flagBits is set,
  1474.                         then the same bit in fdFlags is either set or
  1475.                         cleared depending on the state of the setBits
  1476.                         parameter.
  1477.     
  1478.     Result Codes
  1479.         noErr                0        No error
  1480.         nsvErr                -35        No such volume
  1481.         ioErr                -36        I/O error
  1482.         bdNamErr            -37        Bad filename
  1483.         fnfErr                -43        File not found
  1484.         fLckdErr            -45        File is locked
  1485.         vLckdErr            -46        Volume is locked or read-only
  1486.         paramErr            -50        No default volume
  1487.         dirNFErr            -120    Directory not found or incomplete pathname
  1488.         afpAccessDenied        -5000    User does not have the correct access
  1489.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1490.     
  1491.     __________
  1492.     
  1493.     See also:    FSpChangeFDFlags
  1494. */
  1495.  
  1496. /*****************************************************************************/
  1497.  
  1498. pascal    OSErr    FSpChangeFDFlags(const FSSpec *spec,
  1499.                                  Boolean setBits,
  1500.                                  unsigned short flagBits);
  1501. /*    ¶ Set or clear Finder Flag bits.
  1502.     The FSpChangeFDFlags function sets or clears Finder Flag bits in the
  1503.     fdFlags field of a file or directory's FInfo record.
  1504.     
  1505.     spec        input:    An FSSpec record specifying the object.
  1506.     setBits        input:    If true, then set the bits specified in flagBits.
  1507.                         If false, then clear the bits specified in flagBits.
  1508.     flagBits    input:    The flagBits parameter specifies which Finder Flag
  1509.                         bits to set or clear. If a bit in flagBits is set,
  1510.                         then the same bit in fdFlags is either set or
  1511.                         cleared depending on the state of the setBits
  1512.                         parameter.
  1513.     
  1514.     Result Codes
  1515.         noErr                0        No error
  1516.         nsvErr                -35        No such volume
  1517.         ioErr                -36        I/O error
  1518.         bdNamErr            -37        Bad filename
  1519.         fnfErr                -43        File not found
  1520.         fLckdErr            -45        File is locked
  1521.         vLckdErr            -46        Volume is locked or read-only
  1522.         paramErr            -50        No default volume
  1523.         dirNFErr            -120    Directory not found or incomplete pathname
  1524.         afpAccessDenied        -5000    User does not have the correct access
  1525.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1526.     
  1527.     __________
  1528.     
  1529.     See also:    ChangeFDFlags
  1530. */
  1531.  
  1532. /*****************************************************************************/
  1533.  
  1534. pascal    OSErr    SetIsInvisible(short vRefNum,
  1535.                                long dirID,
  1536.                                StringPtr name);
  1537. /*    ¶ Set the invisible Finder Flag bit.
  1538.     The SetIsInvisible function sets the invisible bit in the fdFlags
  1539.     word of the specified file or directory's finder information.
  1540.     
  1541.     vRefNum    input:    Volume specification.
  1542.     dirID    input:    Directory ID.
  1543.     name    input:    Pointer to object name, or nil when dirID specifies
  1544.                     a directory that's the object.
  1545.     
  1546.     Result Codes
  1547.         noErr                0        No error
  1548.         nsvErr                -35        No such volume
  1549.         ioErr                -36        I/O error
  1550.         bdNamErr            -37        Bad filename
  1551.         fnfErr                -43        File not found
  1552.         fLckdErr            -45        File is locked
  1553.         vLckdErr            -46        Volume is locked or read-only
  1554.         paramErr            -50        No default volume
  1555.         dirNFErr            -120    Directory not found or incomplete pathname
  1556.         afpAccessDenied        -5000    User does not have the correct access
  1557.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1558.     
  1559.     __________
  1560.     
  1561.     See also:    FSpSetIsInvisible, ClearIsInvisible, FSpClearIsInvisible
  1562. */
  1563.  
  1564. /*****************************************************************************/
  1565.  
  1566. pascal    OSErr    FSpSetIsInvisible(const FSSpec *spec);
  1567. /*    ¶ Set the invisible Finder Flag bit.
  1568.     The FSpSetIsInvisible function sets the invisible bit in the fdFlags
  1569.     word of the specified file or directory's finder information.
  1570.     
  1571.     spec    input:    An FSSpec record specifying the object.
  1572.     
  1573.     Result Codes
  1574.         noErr                0        No error
  1575.         nsvErr                -35        No such volume
  1576.         ioErr                -36        I/O error
  1577.         bdNamErr            -37        Bad filename
  1578.         fnfErr                -43        File not found
  1579.         fLckdErr            -45        File is locked
  1580.         vLckdErr            -46        Volume is locked or read-only
  1581.         paramErr            -50        No default volume
  1582.         dirNFErr            -120    Directory not found or incomplete pathname
  1583.         afpAccessDenied        -5000    User does not have the correct access
  1584.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1585.     
  1586.     __________
  1587.     
  1588.     See also:    SetIsInvisible, ClearIsInvisible, FSpClearIsInvisible
  1589. */
  1590.  
  1591. /*****************************************************************************/
  1592.  
  1593. pascal    OSErr    ClearIsInvisible(short vRefNum,
  1594.                                  long dirID,
  1595.                                  StringPtr name);
  1596. /*    ¶ Clear the invisible Finder Flag bit.
  1597.     The ClearIsInvisible function clears the invisible bit in the fdFlags
  1598.     word of the specified file or directory's finder information.
  1599.     
  1600.     vRefNum    input:    Volume specification.
  1601.     dirID    input:    Directory ID.
  1602.     name    input:    Pointer to object name, or nil when dirID specifies
  1603.                     a directory that's the object.
  1604.     
  1605.     Result Codes
  1606.         noErr                0        No error
  1607.         nsvErr                -35        No such volume
  1608.         ioErr                -36        I/O error
  1609.         bdNamErr            -37        Bad filename
  1610.         fnfErr                -43        File not found
  1611.         fLckdErr            -45        File is locked
  1612.         vLckdErr            -46        Volume is locked or read-only
  1613.         paramErr            -50        No default volume
  1614.         dirNFErr            -120    Directory not found or incomplete pathname
  1615.         afpAccessDenied        -5000    User does not have the correct access
  1616.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1617.     
  1618.     __________
  1619.     
  1620.     See also:    SetIsInvisible, FSpSetIsInvisible, FSpClearIsInvisible
  1621. */
  1622.  
  1623. /*****************************************************************************/
  1624.  
  1625. pascal    OSErr    FSpClearIsInvisible(const FSSpec *spec);
  1626. /*    ¶ Clear the invisible Finder Flag bit.
  1627.     The FSpClearIsInvisible function clears the invisible bit in the fdFlags
  1628.     word of the specified file or directory's finder information.
  1629.     
  1630.     spec    input:    An FSSpec record specifying the object.
  1631.     
  1632.     Result Codes
  1633.         noErr                0        No error
  1634.         nsvErr                -35        No such volume
  1635.         ioErr                -36        I/O error
  1636.         bdNamErr            -37        Bad filename
  1637.         fnfErr                -43        File not found
  1638.         fLckdErr            -45        File is locked
  1639.         vLckdErr            -46        Volume is locked or read-only
  1640.         paramErr            -50        No default volume
  1641.         dirNFErr            -120    Directory not found or incomplete pathname
  1642.         afpAccessDenied        -5000    User does not have the correct access
  1643.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1644.     
  1645.     __________
  1646.     
  1647.     See also:    SetIsInvisible, FSpSetIsInvisible, ClearIsInvisible
  1648. */
  1649.  
  1650. /*****************************************************************************/
  1651.  
  1652. pascal    OSErr    SetNameLocked(short vRefNum,
  1653.                               long dirID,
  1654.                               StringPtr name);
  1655. /*    ¶ Set the nameLocked Finder Flag bit.
  1656.     The SetNameLocked function sets the nameLocked bit in the fdFlags word
  1657.     of the specified file or directory's finder information.
  1658.     
  1659.     vRefNum    input:    Volume specification.
  1660.     dirID    input:    Directory ID.
  1661.     name    input:    Pointer to object name, or nil when dirID specifies
  1662.                     a directory that's the object.
  1663.     
  1664.     Result Codes
  1665.         noErr                0        No error
  1666.         nsvErr                -35        No such volume
  1667.         ioErr                -36        I/O error
  1668.         bdNamErr            -37        Bad filename
  1669.         fnfErr                -43        File not found
  1670.         fLckdErr            -45        File is locked
  1671.         vLckdErr            -46        Volume is locked or read-only
  1672.         paramErr            -50        No default volume
  1673.         dirNFErr            -120    Directory not found or incomplete pathname
  1674.         afpAccessDenied        -5000    User does not have the correct access
  1675.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1676.     
  1677.     __________
  1678.     
  1679.     See also:    FSpSetNameLocked, ClearNameLocked, FSpClearNameLocked
  1680. */
  1681.  
  1682. /*****************************************************************************/
  1683.  
  1684. pascal    OSErr    FSpSetNameLocked(const FSSpec *spec);
  1685. /*    ¶ Set the nameLocked Finder Flag bit.
  1686.     The FSpSetNameLocked function sets the nameLocked bit in the fdFlags word
  1687.     of the specified file or directory's finder information.
  1688.     
  1689.     spec    input:    An FSSpec record specifying the object.
  1690.     
  1691.     Result Codes
  1692.         noErr                0        No error
  1693.         nsvErr                -35        No such volume
  1694.         ioErr                -36        I/O error
  1695.         bdNamErr            -37        Bad filename
  1696.         fnfErr                -43        File not found
  1697.         fLckdErr            -45        File is locked
  1698.         vLckdErr            -46        Volume is locked or read-only
  1699.         paramErr            -50        No default volume
  1700.         dirNFErr            -120    Directory not found or incomplete pathname
  1701.         afpAccessDenied        -5000    User does not have the correct access
  1702.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1703.     
  1704.     __________
  1705.     
  1706.     See also:    SetNameLocked, ClearNameLocked, FSpClearNameLocked
  1707. */
  1708.  
  1709. /*****************************************************************************/
  1710.  
  1711. pascal    OSErr    ClearNameLocked(short vRefNum,
  1712.                                 long dirID,
  1713.                                 StringPtr name);
  1714. /*    ¶ Clear the nameLocked Finder Flag bit.
  1715.     The ClearNameLocked function clears the nameLocked bit in the fdFlags
  1716.     word of the specified file or directory's finder information.
  1717.     
  1718.     vRefNum    input:    Volume specification.
  1719.     dirID    input:    Directory ID.
  1720.     name    input:    Pointer to object name, or nil when dirID specifies
  1721.                     a directory that's the object.
  1722.     
  1723.     Result Codes
  1724.         noErr                0        No error
  1725.         nsvErr                -35        No such volume
  1726.         ioErr                -36        I/O error
  1727.         bdNamErr            -37        Bad filename
  1728.         fnfErr                -43        File not found
  1729.         fLckdErr            -45        File is locked
  1730.         vLckdErr            -46        Volume is locked or read-only
  1731.         paramErr            -50        No default volume
  1732.         dirNFErr            -120    Directory not found or incomplete pathname
  1733.         afpAccessDenied        -5000    User does not have the correct access
  1734.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1735.     
  1736.     __________
  1737.     
  1738.     See also:    SetNameLocked, FSpSetNameLocked, FSpClearNameLocked
  1739. */
  1740.  
  1741. /*****************************************************************************/
  1742.  
  1743. pascal    OSErr    FSpClearNameLocked(const FSSpec *spec);
  1744. /*    ¶ Clear the nameLocked Finder Flag bit.
  1745.     The FSpClearNameLocked function clears the nameLocked bit in the fdFlags
  1746.     word of the specified file or directory's finder information.
  1747.     
  1748.     spec    input:    An FSSpec record specifying the object.
  1749.     
  1750.     Result Codes
  1751.         noErr                0        No error
  1752.         nsvErr                -35        No such volume
  1753.         ioErr                -36        I/O error
  1754.         bdNamErr            -37        Bad filename
  1755.         fnfErr                -43        File not found
  1756.         fLckdErr            -45        File is locked
  1757.         vLckdErr            -46        Volume is locked or read-only
  1758.         paramErr            -50        No default volume
  1759.         dirNFErr            -120    Directory not found or incomplete pathname
  1760.         afpAccessDenied        -5000    User does not have the correct access
  1761.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1762.     
  1763.     __________
  1764.     
  1765.     See also:    SetNameLocked, FSpSetNameLocked, ClearNameLocked
  1766. */
  1767.  
  1768. /*****************************************************************************/
  1769.  
  1770. pascal    OSErr    SetIsStationery(short vRefNum,
  1771.                                 long dirID,
  1772.                                 ConstStr255Param name);
  1773. /*    ¶ Set the isStationery Finder Flag bit.
  1774.     The SetIsStationery function sets the isStationery bit in the
  1775.     fdFlags word of the specified file or directory's finder information.
  1776.     
  1777.     vRefNum    input:    Volume specification.
  1778.     dirID    input:    Directory ID.
  1779.     name    input:    Pointer to object name, or nil when dirID specifies
  1780.                     a directory that's the object.
  1781.     
  1782.     Result Codes
  1783.         noErr                0        No error
  1784.         nsvErr                -35        No such volume
  1785.         ioErr                -36        I/O error
  1786.         bdNamErr            -37        Bad filename
  1787.         fnfErr                -43        File not found
  1788.         fLckdErr            -45        File is locked
  1789.         vLckdErr            -46        Volume is locked or read-only
  1790.         paramErr            -50        No default volume
  1791.         dirNFErr            -120    Directory not found or incomplete pathname
  1792.         afpAccessDenied        -5000    User does not have the correct access
  1793.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1794.     
  1795.     __________
  1796.     
  1797.     See also:    FSpSetIsStationery, ClearIsStationery, FSpClearIsStationery
  1798. */
  1799.  
  1800. /*****************************************************************************/
  1801.  
  1802. pascal    OSErr    FSpSetIsStationery(const FSSpec *spec);
  1803. /*    ¶ Set the isStationery Finder Flag bit.
  1804.     The FSpSetIsStationery function sets the isStationery bit in the
  1805.     fdFlags word of the specified file or directory's finder information.
  1806.     
  1807.     spec    input:    An FSSpec record specifying the object.
  1808.     
  1809.     Result Codes
  1810.         noErr                0        No error
  1811.         nsvErr                -35        No such volume
  1812.         ioErr                -36        I/O error
  1813.         bdNamErr            -37        Bad filename
  1814.         fnfErr                -43        File not found
  1815.         fLckdErr            -45        File is locked
  1816.         vLckdErr            -46        Volume is locked or read-only
  1817.         paramErr            -50        No default volume
  1818.         dirNFErr            -120    Directory not found or incomplete pathname
  1819.         afpAccessDenied        -5000    User does not have the correct access
  1820.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1821.     
  1822.     __________
  1823.     
  1824.     See also:    SetIsStationery, ClearIsStationery, FSpClearIsStationery
  1825. */
  1826.  
  1827. /*****************************************************************************/
  1828.  
  1829. pascal    OSErr    ClearIsStationery(short vRefNum,
  1830.                                   long dirID,
  1831.                                   ConstStr255Param name);
  1832. /*    ¶ Clear the isStationery Finder Flag bit.
  1833.     The ClearIsStationery function clears the isStationery bit in the
  1834.     fdFlags word of the specified file or directory's finder information.
  1835.     
  1836.     vRefNum    input:    Volume specification.
  1837.     dirID    input:    Directory ID.
  1838.     name    input:    Pointer to object name, or nil when dirID specifies
  1839.                     a directory that's the object.
  1840.     
  1841.     Result Codes
  1842.         noErr                0        No error
  1843.         nsvErr                -35        No such volume
  1844.         ioErr                -36        I/O error
  1845.         bdNamErr            -37        Bad filename
  1846.         fnfErr                -43        File not found
  1847.         fLckdErr            -45        File is locked
  1848.         vLckdErr            -46        Volume is locked or read-only
  1849.         paramErr            -50        No default volume
  1850.         dirNFErr            -120    Directory not found or incomplete pathname
  1851.         afpAccessDenied        -5000    User does not have the correct access
  1852.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1853.     
  1854.     __________
  1855.     
  1856.     See also:    SetIsStationery, FSpSetIsStationery, FSpClearIsStationery
  1857. */
  1858.  
  1859. /*****************************************************************************/
  1860.  
  1861. pascal    OSErr    FSpClearIsStationery(const FSSpec *spec);
  1862. /*    ¶ Clear the isStationery Finder Flag bit.
  1863.     The FSpClearIsStationery function clears the isStationery bit in the
  1864.     fdFlags word of the specified file or directory's finder information.
  1865.     
  1866.     spec    input:    An FSSpec record specifying the object.
  1867.     
  1868.     Result Codes
  1869.         noErr                0        No error
  1870.         nsvErr                -35        No such volume
  1871.         ioErr                -36        I/O error
  1872.         bdNamErr            -37        Bad filename
  1873.         fnfErr                -43        File not found
  1874.         fLckdErr            -45        File is locked
  1875.         vLckdErr            -46        Volume is locked or read-only
  1876.         paramErr            -50        No default volume
  1877.         dirNFErr            -120    Directory not found or incomplete pathname
  1878.         afpAccessDenied        -5000    User does not have the correct access
  1879.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1880.     
  1881.     __________
  1882.     
  1883.     See also:    SetIsStationery, FSpSetIsStationery, ClearIsStationery
  1884. */
  1885.  
  1886. /*****************************************************************************/
  1887.  
  1888. pascal    OSErr    SetHasCustomIcon(short vRefNum,
  1889.                                  long dirID,
  1890.                                  StringPtr name);
  1891. /*    ¶ Set the hasCustomIcon Finder Flag bit.
  1892.     The SetHasCustomIcon function sets the hasCustomIcon bit in the
  1893.     fdFlags word of the specified file or directory's finder information.
  1894.     
  1895.     vRefNum    input:    Volume specification.
  1896.     dirID    input:    Directory ID.
  1897.     name    input:    Pointer to object name, or nil when dirID specifies
  1898.                     a directory that's the object.
  1899.     
  1900.     Result Codes
  1901.         noErr                0        No error
  1902.         nsvErr                -35        No such volume
  1903.         ioErr                -36        I/O error
  1904.         bdNamErr            -37        Bad filename
  1905.         fnfErr                -43        File not found
  1906.         fLckdErr            -45        File is locked
  1907.         vLckdErr            -46        Volume is locked or read-only
  1908.         paramErr            -50        No default volume
  1909.         dirNFErr            -120    Directory not found or incomplete pathname
  1910.         afpAccessDenied        -5000    User does not have the correct access
  1911.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1912.     
  1913.     __________
  1914.     
  1915.     See also:    FSpSetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon
  1916. */
  1917.  
  1918. /*****************************************************************************/
  1919.  
  1920. pascal    OSErr    FSpSetHasCustomIcon(const FSSpec *spec);
  1921. /*    ¶ Set the hasCustomIcon Finder Flag bit.
  1922.     The FSpSetHasCustomIcon function sets the hasCustomIcon bit in the
  1923.     fdFlags word of the specified file or directory's finder information.
  1924.     
  1925.     spec    input:    An FSSpec record specifying the object.
  1926.     
  1927.     Result Codes
  1928.         noErr                0        No error
  1929.         nsvErr                -35        No such volume
  1930.         ioErr                -36        I/O error
  1931.         bdNamErr            -37        Bad filename
  1932.         fnfErr                -43        File not found
  1933.         fLckdErr            -45        File is locked
  1934.         vLckdErr            -46        Volume is locked or read-only
  1935.         paramErr            -50        No default volume
  1936.         dirNFErr            -120    Directory not found or incomplete pathname
  1937.         afpAccessDenied        -5000    User does not have the correct access
  1938.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1939.     
  1940.     __________
  1941.     
  1942.     See also:    SetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon
  1943. */
  1944.  
  1945. /*****************************************************************************/
  1946.  
  1947. pascal    OSErr    ClearHasCustomIcon(short vRefNum,
  1948.                                    long dirID,
  1949.                                    StringPtr name);
  1950. /*    ¶ Clear the hasCustomIcon Finder Flag bit.
  1951.     The ClearHasCustomIcon function clears the hasCustomIcon bit in the
  1952.     fdFlags word of the specified file or directory's finder information.
  1953.     
  1954.     vRefNum    input:    Volume specification.
  1955.     dirID    input:    Directory ID.
  1956.     name    input:    Pointer to object name, or nil when dirID specifies
  1957.                     a directory that's the object.
  1958.     
  1959.     Result Codes
  1960.         noErr                0        No error
  1961.         nsvErr                -35        No such volume
  1962.         ioErr                -36        I/O error
  1963.         bdNamErr            -37        Bad filename
  1964.         fnfErr                -43        File not found
  1965.         fLckdErr            -45        File is locked
  1966.         vLckdErr            -46        Volume is locked or read-only
  1967.         paramErr            -50        No default volume
  1968.         dirNFErr            -120    Directory not found or incomplete pathname
  1969.         afpAccessDenied        -5000    User does not have the correct access
  1970.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1971.     
  1972.     __________
  1973.     
  1974.     See also:    SetHasCustomIcon, FSpSetHasCustomIcon, FSpClearHasCustomIcon
  1975. */
  1976.  
  1977. /*****************************************************************************/
  1978.  
  1979. pascal    OSErr    FSpClearHasCustomIcon(const FSSpec *spec);
  1980. /*    ¶ Clear the hasCustomIcon Finder Flag bit.
  1981.     The FSpClearHasCustomIcon function clears the hasCustomIcon bit in the
  1982.     fdFlags word of the specified file or directory's finder information.
  1983.     
  1984.     spec    input:    An FSSpec record specifying the object.
  1985.     
  1986.     Result Codes
  1987.         noErr                0        No error
  1988.         nsvErr                -35        No such volume
  1989.         ioErr                -36        I/O error
  1990.         bdNamErr            -37        Bad filename
  1991.         fnfErr                -43        File not found
  1992.         fLckdErr            -45        File is locked
  1993.         vLckdErr            -46        Volume is locked or read-only
  1994.         paramErr            -50        No default volume
  1995.         dirNFErr            -120    Directory not found or incomplete pathname
  1996.         afpAccessDenied        -5000    User does not have the correct access
  1997.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1998.     
  1999.     __________
  2000.     
  2001.     See also:    SetHasCustomIcon, FSpSetHasCustomIcon, ClearHasCustomIcon
  2002. */
  2003.  
  2004. /*****************************************************************************/
  2005.  
  2006. pascal    OSErr    ClearHasBeenInited(short vRefNum,
  2007.                                    long dirID,
  2008.                                    StringPtr name);
  2009. /*    ¶ Clear the hasBeenInited Finder Flag bit.
  2010.     The ClearHasBeenInited function clears the hasBeenInited bit in the
  2011.     fdFlags word of the specified file or directory's finder information.
  2012.     
  2013.     vRefNum    input:    Volume specification.
  2014.     dirID    input:    Directory ID.
  2015.     name    input:    Pointer to object name, or nil when dirID specifies
  2016.                     a directory that's the object.
  2017.     
  2018.     Result Codes
  2019.         noErr                0        No error
  2020.         nsvErr                -35        No such volume
  2021.         ioErr                -36        I/O error
  2022.         bdNamErr            -37        Bad filename
  2023.         fnfErr                -43        File not found
  2024.         fLckdErr            -45        File is locked
  2025.         vLckdErr            -46        Volume is locked or read-only
  2026.         paramErr            -50        No default volume
  2027.         dirNFErr            -120    Directory not found or incomplete pathname
  2028.         afpAccessDenied        -5000    User does not have the correct access
  2029.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2030.     
  2031.     __________
  2032.     
  2033.     See also:    FSpClearHasBeenInited
  2034. */
  2035.  
  2036. /*****************************************************************************/
  2037.  
  2038. pascal    OSErr    FSpClearHasBeenInited(const FSSpec *spec);
  2039. /*    ¶ Clear the hasBeenInited Finder Flag bit.
  2040.     The FSpClearHasBeenInited function clears the hasBeenInited bit in the
  2041.     fdFlags word of the specified file or directory's finder information.
  2042.     
  2043.     spec    input:    An FSSpec record specifying the object.
  2044.     
  2045.     Result Codes
  2046.         noErr                0        No error
  2047.         nsvErr                -35        No such volume
  2048.         ioErr                -36        I/O error
  2049.         bdNamErr            -37        Bad filename
  2050.         fnfErr                -43        File not found
  2051.         fLckdErr            -45        File is locked
  2052.         vLckdErr            -46        Volume is locked or read-only
  2053.         paramErr            -50        No default volume
  2054.         dirNFErr            -120    Directory not found or incomplete pathname
  2055.         afpAccessDenied        -5000    User does not have the correct access
  2056.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2057.     
  2058.     __________
  2059.     
  2060.     See also:    ClearHasBeenInited
  2061. */
  2062.  
  2063. /*****************************************************************************/
  2064.  
  2065. pascal    OSErr    CopyFileMgrAttributes(short srcVRefNum,
  2066.                                       long srcDirID,
  2067.                                       StringPtr srcName,
  2068.                                       short dstVRefNum,
  2069.                                       long dstDirID,
  2070.                                       StringPtr dstName,
  2071.                                       Boolean copyLockBit);
  2072. /*    ¶ Copy all File Manager attributes from the source to the destination.
  2073.     The CopyFileMgrAttributes function copies all File Manager attributes
  2074.     from the source file or directory to the destination file or directory.
  2075.     If copyLockBit is true, then set the locked state of the destination
  2076.     to match the source.
  2077.  
  2078.     srcVRefNum    input:    Source volume specification.
  2079.     srcDirID    input:    Source directory ID.
  2080.     srcName        input:    Pointer to source object name, or nil when
  2081.                         srcDirID specifies a directory that's the object.
  2082.     dstVRefNum    input:    Destination volume specification.
  2083.     dstDirID    input:    Destination directory ID.
  2084.     dstName        input:    Pointer to destination object name, or nil when
  2085.                         dstDirID specifies a directory that's the object.
  2086.     copyLockBit    input:    If true, set the locked state of the destination
  2087.                         to match the source.
  2088.     
  2089.     Result Codes
  2090.         noErr                0        No error
  2091.         nsvErr                -35        No such volume
  2092.         ioErr                -36        I/O error
  2093.         bdNamErr            -37        Bad filename
  2094.         fnfErr                -43        File not found
  2095.         fLckdErr            -45        File is locked
  2096.         vLckdErr            -46        Volume is locked or read-only
  2097.         paramErr            -50        No default volume
  2098.         dirNFErr            -120    Directory not found or incomplete pathname
  2099.         afpAccessDenied        -5000    User does not have the correct access
  2100.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2101.     
  2102.     __________
  2103.     
  2104.     See also:    FSpCopyFileMgrAttributes
  2105. */
  2106.  
  2107. /*****************************************************************************/
  2108.  
  2109. pascal    OSErr    FSpCopyFileMgrAttributes(const FSSpec *srcSpec,
  2110.                                          const FSSpec *dstSpec,
  2111.                                          Boolean copyLockBit);
  2112. /*    ¶ Copy all File Manager attributes from the source to the destination.
  2113.     The FSpCopyFileMgrAttributes function copies all File Manager attributes
  2114.     from the source file or directory to the destination file or directory.
  2115.     If copyLockBit is true, then set the locked state of the destination
  2116.     to match the source.
  2117.  
  2118.     srcSpec        input:    An FSSpec record specifying the source object.
  2119.     dstSpec        input:    An FSSpec record specifying the destination object.
  2120.     copyLockBit    input:    If true, set the locked state of the destination
  2121.                         to match the source.
  2122.     
  2123.     Result Codes
  2124.         noErr                0        No error
  2125.         nsvErr                -35        No such volume
  2126.         ioErr                -36        I/O error
  2127.         bdNamErr            -37        Bad filename
  2128.         fnfErr                -43        File not found
  2129.         fLckdErr            -45        File is locked
  2130.         vLckdErr            -46        Volume is locked or read-only
  2131.         paramErr            -50        No default volume
  2132.         dirNFErr            -120    Directory not found or incomplete pathname
  2133.         afpAccessDenied        -5000    User does not have the correct access
  2134.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2135.     
  2136.     __________
  2137.     
  2138.     See also:    CopyFileMgrAttributes
  2139. */
  2140.  
  2141. /*****************************************************************************/
  2142.  
  2143. pascal    OSErr    HOpenAware(short vRefNum,
  2144.                            long dirID,
  2145.                            ConstStr255Param fileName,
  2146.                            short denyModes,
  2147.                            short *refNum);
  2148. /*    ¶ Open the data fork of a file using deny mode permissions.
  2149.     The HOpenAware function opens the data fork of a file using deny mode
  2150.     permissions instead the normal File Manager permissions.  If OpenDeny
  2151.     is not available, then HOpenAware translates the deny modes to the
  2152.     closest File Manager permissions and tries to open the file with
  2153.     OpenDF first, and then Open if OpenDF isn't available. By using
  2154.     HOpenAware with deny mode permissions, a program can be "AppleShare
  2155.     aware" and fall back on the standard File Manager open calls
  2156.     automatically.
  2157.  
  2158.     vRefNum        input:    Volume specification.
  2159.     dirID        input:    Directory ID.
  2160.     fileName    input:    The name of the file.
  2161.     denyModes    input:    The deny modes access under which to open the file.
  2162.     refNum        output:    The file reference number of the opened file.
  2163.     
  2164.     Result Codes
  2165.         noErr                0        No error
  2166.         nsvErr                -35        No such volume
  2167.         tmfoErr                -42        Too many files open
  2168.         fnfErr                -43        File not found
  2169.         wPrErr                -44        Volume locked by hardware
  2170.         fLckdErr            -45        File is locked
  2171.         vLckdErr            -46        Volume is locked or read-only
  2172.         opWrErr                -49        File already open for writing
  2173.         paramErr            -50        No default volume
  2174.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2175.         afpAccessDenied        -5000    User does not have the correct access to the file
  2176.         afpDenyConflict        -5006    Requested access permission not possible
  2177.     
  2178.     __________
  2179.     
  2180.     See also:    FSpOpenAware, HOpenRFAware, FSpOpenRFAware
  2181. */
  2182.  
  2183. /*****************************************************************************/
  2184.  
  2185. pascal    OSErr    FSpOpenAware(const FSSpec *spec,
  2186.                              short denyModes,
  2187.                              short *refNum);
  2188. /*    ¶ Open the data fork of a file using deny mode permissions.
  2189.     The FSpOpenAware function opens the data fork of a file using deny mode
  2190.     permissions instead the normal File Manager permissions.  If OpenDeny
  2191.     is not available, then FSpOpenAware translates the deny modes to the
  2192.     closest File Manager permissions and tries to open the file with
  2193.     OpenDF first, and then Open if OpenDF isn't available. By using
  2194.     FSpOpenAware with deny mode permissions, a program can be "AppleShare
  2195.     aware" and fall back on the standard File Manager open calls
  2196.     automatically.
  2197.  
  2198.     spec        input:    An FSSpec record specifying the file.
  2199.     denyModes    input:    The deny modes access under which to open the file.
  2200.     refNum        output:    The file reference number of the opened file.
  2201.     
  2202.     Result Codes
  2203.         noErr                0        No error
  2204.         nsvErr                -35        No such volume
  2205.         tmfoErr                -42        Too many files open
  2206.         fnfErr                -43        File not found
  2207.         wPrErr                -44        Volume locked by hardware
  2208.         fLckdErr            -45        File is locked
  2209.         vLckdErr            -46        Volume is locked or read-only
  2210.         opWrErr                -49        File already open for writing
  2211.         paramErr            -50        No default volume
  2212.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2213.         afpAccessDenied        -5000    User does not have the correct access to the file
  2214.         afpDenyConflict        -5006    Requested access permission not possible
  2215.     
  2216.     __________
  2217.     
  2218.     See also:    HOpenAware, HOpenRFAware, FSpOpenRFAware
  2219. */
  2220.  
  2221. /*****************************************************************************/
  2222.  
  2223. pascal    OSErr    HOpenRFAware(short vRefNum,
  2224.                              long dirID,
  2225.                              ConstStr255Param fileName,
  2226.                              short denyModes,
  2227.                              short *refNum);
  2228. /*    ¶ Open the resource fork of a file using deny mode permissions.
  2229.     The HOpenRFAware function opens the resource fork of a file using deny
  2230.     mode permissions instead the normal File Manager permissions.  If
  2231.     OpenRFDeny is not available, then HOpenRFAware translates the deny
  2232.     modes to the closest File Manager permissions and tries to open the
  2233.     file with OpenRF. By using HOpenRFAware with deny mode permissions,
  2234.     a program can be "AppleShare aware" and fall back on the standard
  2235.     File Manager open calls automatically.
  2236.  
  2237.     vRefNum        input:    Volume specification.
  2238.     dirID        input:    Directory ID.
  2239.     fileName    input:    The name of the file.
  2240.     denyModes    input:    The deny modes access under which to open the file.
  2241.     refNum        output:    The file reference number of the opened file.
  2242.     
  2243.     Result Codes
  2244.         noErr                0        No error
  2245.         nsvErr                -35        No such volume
  2246.         tmfoErr                -42        Too many files open
  2247.         fnfErr                -43        File not found
  2248.         wPrErr                -44        Volume locked by hardware
  2249.         fLckdErr            -45        File is locked
  2250.         vLckdErr            -46        Volume is locked or read-only
  2251.         opWrErr                -49        File already open for writing
  2252.         paramErr            -50        No default volume
  2253.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2254.         afpAccessDenied        -5000    User does not have the correct access to the file
  2255.         afpDenyConflict        -5006    Requested access permission not possible
  2256.     
  2257.     __________
  2258.     
  2259.     See also:    HOpenAware, FSpOpenAware, FSpOpenRFAware
  2260. */
  2261.  
  2262. /*****************************************************************************/
  2263.  
  2264. pascal    OSErr    FSpOpenRFAware(const FSSpec *spec,
  2265.                                short denyModes,
  2266.                                short *refNum);
  2267. /*    ¶ Open the resource fork of a file using deny mode permissions.
  2268.     The FSpOpenRFAware function opens the resource fork of a file using deny
  2269.     mode permissions instead the normal File Manager permissions.  If
  2270.     OpenRFDeny is not available, then FSpOpenRFAware translates the deny
  2271.     modes to the closest File Manager permissions and tries to open the
  2272.     file with OpenRF. By using FSpOpenRFAware with deny mode permissions,
  2273.     a program can be "AppleShare aware" and fall back on the standard
  2274.     File Manager open calls automatically.
  2275.  
  2276.     spec        input:    An FSSpec record specifying the file.
  2277.     denyModes    input:    The deny modes access under which to open the file.
  2278.     refNum        output:    The file reference number of the opened file.
  2279.     
  2280.     Result Codes
  2281.         noErr                0        No error
  2282.         nsvErr                -35        No such volume
  2283.         tmfoErr                -42        Too many files open
  2284.         fnfErr                -43        File not found
  2285.         wPrErr                -44        Volume locked by hardware
  2286.         fLckdErr            -45        File is locked
  2287.         vLckdErr            -46        Volume is locked or read-only
  2288.         opWrErr                -49        File already open for writing
  2289.         paramErr            -50        No default volume
  2290.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2291.         afpAccessDenied        -5000    User does not have the correct access to the file
  2292.         afpDenyConflict        -5006    Requested access permission not possible
  2293.     
  2294.     __________
  2295.     
  2296.     See also:    HOpenAware, FSpOpenAware, HOpenRFAware
  2297. */
  2298.  
  2299. /*****************************************************************************/
  2300.  
  2301. pascal    OSErr    FSReadNoCache(short refNum,
  2302.                               long *count,
  2303.                               void *buffPtr);
  2304. /*    ¶ Read any number of bytes from an open file requesting no caching.
  2305.     The FSReadNoCache function reads any number of bytes from an open file
  2306.     while asking the file system to bypass its cache mechanism.
  2307.     
  2308.     refNum    input:    The file reference number of an open file.
  2309.     count    input:    The number of bytes to read.
  2310.             output:    The number of bytes actually read.
  2311.     buffPtr    input:    A pointer to the data buffer into which the bytes are
  2312.                     to be read.
  2313.     
  2314.     Result Codes
  2315.         noErr                0        No error
  2316.         readErr                –19        Driver does not respond to read requests
  2317.         badUnitErr            –21        Driver reference number does not
  2318.                                     match unit table
  2319.         unitEmptyErr        –22        Driver reference number specifies a
  2320.                                     nil handle in unit table
  2321.         abortErr            –27        Request aborted by KillIO
  2322.         notOpenErr            –28        Driver not open
  2323.         ioErr                –36        Data does not match in read-verify mode
  2324.         fnOpnErr            -38        File not open
  2325.         rfNumErr            -51        Bad reference number
  2326.         afpAccessDenied        -5000    User does not have the correct access to
  2327.                                     the file
  2328.  
  2329.     __________
  2330.     
  2331.     See also:    FSWriteNoCache
  2332. */
  2333.  
  2334. /*****************************************************************************/
  2335.  
  2336. pascal    OSErr    FSWriteNoCache(short refNum,
  2337.                                long *count,
  2338.                                const void *buffPtr);
  2339. /*    ¶ Write any number of bytes to an open file requesting no caching.
  2340.     The FSReadNoCache function writes any number of bytes to an open file
  2341.     while asking the file system to bypass its cache mechanism.
  2342.     
  2343.     refNum    input:    The file reference number of an open file.
  2344.     count    input:    The number of bytes to write to the file.
  2345.             output:    The number of bytes actually written.
  2346.     buffPtr    input:    A pointer to the data buffer from which the bytes are
  2347.                     to be written.
  2348.     
  2349.     Result Codes
  2350.         noErr                0        No error
  2351.         writErr                –20        Driver does not respond to write requests
  2352.         badUnitErr            –21        Driver reference number does not
  2353.                                     match unit table
  2354.         unitEmptyErr        –22        Driver reference number specifies a
  2355.                                     nil handle in unit table
  2356.         abortErr            –27        Request aborted by KillIO
  2357.         notOpenErr            –28        Driver not open
  2358.         dskFulErr            -34        Disk full    
  2359.         ioErr                –36        Data does not match in read-verify mode
  2360.         fnOpnErr            -38        File not open
  2361.         wPrErr                -44        Hardware volume lock    
  2362.         fLckdErr            -45        File is locked    
  2363.         vLckdErr            -46        Software volume lock    
  2364.         rfNumErr            -51        Bad reference number
  2365.         wrPermErr            -61        Read/write permission doesn’t
  2366.                                     allow writing    
  2367.         afpAccessDenied        -5000    User does not have the correct access to
  2368.                                     the file
  2369.  
  2370.     __________
  2371.     
  2372.     See also:    FSReadNoCache
  2373. */
  2374.  
  2375. /*****************************************************************************/
  2376.  
  2377. pascal    OSErr    FSWriteVerify(short refNum,
  2378.                               long *count,
  2379.                               const void *buffPtr);
  2380. /*    ¶ Write any number of bytes to an open file and then verify the data was written.
  2381.     The FSWriteVerify function writes any number of bytes to an open file
  2382.     and then verifies that the data was actually written to the device.
  2383.     
  2384.     refNum    input:    The file reference number of an open file.
  2385.     count    input:    The number of bytes to write to the file.
  2386.             output:    The number of bytes actually written and verified.
  2387.     buffPtr    input:    A pointer to the data buffer from which the bytes are
  2388.                     to be written.
  2389.     
  2390.     Result Codes
  2391.         noErr                0        No error
  2392.         readErr                –19        Driver does not respond to read requests
  2393.         writErr                –20        Driver does not respond to write requests
  2394.         badUnitErr            –21        Driver reference number does not
  2395.                                     match unit table
  2396.         unitEmptyErr        –22        Driver reference number specifies a
  2397.                                     nil handle in unit table
  2398.         abortErr            –27        Request aborted by KillIO
  2399.         notOpenErr            –28        Driver not open
  2400.         dskFulErr            -34        Disk full    
  2401.         ioErr                –36        Data does not match in read-verify mode
  2402.         fnOpnErr            -38        File not open
  2403.         eofErr                -39        Logical end-of-file reached
  2404.         posErr                -40        Attempt to position mark before start
  2405.                                     of file
  2406.         wPrErr                -44        Hardware volume lock    
  2407.         fLckdErr            -45        File is locked    
  2408.         vLckdErr            -46        Software volume lock    
  2409.         rfNumErr            -51        Bad reference number
  2410.         gfpErr                -52        Error during GetFPos
  2411.         wrPermErr            -61        Read/write permission doesn’t
  2412.                                     allow writing    
  2413.         memFullErr            -108    Not enough room in heap zone to allocate
  2414.                                     verify buffer
  2415.         afpAccessDenied        -5000    User does not have the correct access to
  2416.                                     the file
  2417. */
  2418.  
  2419. /*****************************************************************************/
  2420.  
  2421. pascal    OSErr    CopyFork(short srcRefNum,
  2422.                          short dstRefNum,
  2423.                          void *copyBufferPtr,
  2424.                          long copyBufferSize);
  2425. /*    ¶ Copy all data from the source fork to the destination fork of open file forks.
  2426.     The CopyFork function copies all data from the source fork to the
  2427.     destination fork of open file forks and makes sure the destination EOF
  2428.     is equal to the source EOF.
  2429.     
  2430.     srcRefNum        input:    The source file reference number.
  2431.     dstRefNum        input:    The destination file reference number.
  2432.     copyBufferPtr    input:    Pointer to buffer to use during copy. The
  2433.                             buffer should be at least 512-bytes minimum.
  2434.                             The larger the buffer, the faster the copy.
  2435.     copyBufferSize    input:    The size of the copy buffer.
  2436.     
  2437.     Result Codes
  2438.         noErr                0        No error
  2439.         readErr                –19        Driver does not respond to read requests
  2440.         writErr                –20        Driver does not respond to write requests
  2441.         badUnitErr            –21        Driver reference number does not
  2442.                                     match unit table
  2443.         unitEmptyErr        –22        Driver reference number specifies a
  2444.                                     nil handle in unit table
  2445.         abortErr            –27        Request aborted by KillIO
  2446.         notOpenErr            –28        Driver not open
  2447.         dskFulErr            -34        Disk full    
  2448.         ioErr                –36        Data does not match in read-verify mode
  2449.         fnOpnErr            -38        File not open
  2450.         wPrErr                -44        Hardware volume lock    
  2451.         fLckdErr            -45        File is locked    
  2452.         vLckdErr            -46        Software volume lock    
  2453.         rfNumErr            -51        Bad reference number
  2454.         wrPermErr            -61        Read/write permission doesn’t
  2455.                                     allow writing    
  2456.         afpAccessDenied        -5000    User does not have the correct access to
  2457.                                     the file
  2458. */
  2459.  
  2460. /*****************************************************************************/
  2461.  
  2462. pascal    OSErr    GetFileLocation(short refNum,
  2463.                                 short *vRefNum,
  2464.                                 long *dirID,
  2465.                                 StringPtr fileName);
  2466. /*    ¶ Get the location of an open file.
  2467.     The GetFileLocation function gets the location (volume reference number,
  2468.     directory ID, and fileName) of an open file.
  2469.  
  2470.     refNum        input:    The file reference number of an open file.
  2471.     vRefNum        output:    The volume reference number.
  2472.     dirID        output:    The parent directory ID.
  2473.     fileName    input:    Points to a buffer (minimum Str63) where the
  2474.                         filename is to be returned or must be nil.
  2475.                 output:    The filename.
  2476.     
  2477.     Result Codes
  2478.         noErr                0        No error
  2479.         nsvErr                -35        Specified volume doesn’t exist
  2480.         fnOpnErr            -38        File not open
  2481.         rfNumErr            -51        Reference number specifies nonexistent
  2482.                                     access path
  2483.     
  2484.     __________
  2485.     
  2486.     See also:    FSpGetFileLocation
  2487. */
  2488.  
  2489. /*****************************************************************************/
  2490.  
  2491. pascal    OSErr    FSpGetFileLocation(short refNum,
  2492.                                    FSSpec *spec);
  2493. /*    ¶ Get the location of an open file in an FSSpec record.
  2494.     The FSpGetFileLocation function gets the location of an open file in
  2495.     an FSSpec record.
  2496.  
  2497.     refNum        input:    The file reference number of an open file.
  2498.     spec        output:    FSSpec record containing the file name and location.
  2499.     
  2500.     Result Codes
  2501.         noErr                0        No error
  2502.         nsvErr                -35        Specified volume doesn’t exist
  2503.         fnOpnErr            -38        File not open
  2504.         rfNumErr            -51        Reference number specifies nonexistent
  2505.                                     access path
  2506.     
  2507.     __________
  2508.     
  2509.     See also:    GetFileLocation
  2510. */
  2511.  
  2512. /*****************************************************************************/
  2513.  
  2514. pascal    OSErr    CopyDirectoryAccess(short srcVRefNum,
  2515.                                     long srcDirID,
  2516.                                     StringPtr srcName,
  2517.                                     short dstVRefNum,
  2518.                                     long dstDirID,
  2519.                                     StringPtr dstName);
  2520. /*    ¶ Copy the AFP directory access privileges.
  2521.     The CopyDirectoryAccess function copies the AFP directory access
  2522.     privileges from one directory to another. Both directories must be on
  2523.     the same file server, but not necessarily on the same server volume.
  2524.     
  2525.     srcVRefNum    input:    Source volume specification.
  2526.     srcDirID    input:    Source directory ID.
  2527.     srcName        input:    Pointer to source directory name, or nil when
  2528.                         srcDirID specifies the directory.
  2529.     dstVRefNum    input:    Destination volume specification.
  2530.     dstDirID    input:    Destination directory ID.
  2531.     dstName        input:    Pointer to destination directory name, or nil when
  2532.                         dstDirID specifies the directory.
  2533.     
  2534.     Result Codes
  2535.         noErr                0        No error
  2536.         nsvErr                -35        Volume not found
  2537.         fnfErr                -43        Directory not found
  2538.         vLckdErr            -46        Volume is locked or read-only
  2539.         paramErr            -50        Volume doesn't support this function
  2540.         afpAccessDenied        -5000    User does not have the correct access
  2541.                                     to the directory
  2542.         afpObjectTypeErr    -5025    Object is a file, not a directory
  2543.     
  2544.     __________
  2545.     
  2546.     See also:    FSpCopyDirectoryAccess
  2547. */
  2548.  
  2549. /*****************************************************************************/
  2550.  
  2551. pascal    OSErr    FSpCopyDirectoryAccess(const FSSpec *srcSpec,
  2552.                                        const FSSpec *dstSpec);
  2553. /*    ¶ Copy the AFP directory access privileges.
  2554.     The FSpCopyDirectoryAccess function copies the AFP directory access
  2555.     privileges from one directory to another. Both directories must be on
  2556.     the same file server, but not necessarily on the same server volume.
  2557.  
  2558.     srcSpec        input:    An FSSpec record specifying the source directory.
  2559.     dstSpec        input:    An FSSpec record specifying the destination directory.
  2560.     
  2561.     Result Codes
  2562.         noErr                0        No error
  2563.         nsvErr                -35        Volume not found
  2564.         fnfErr                -43        Directory not found
  2565.         vLckdErr            -46        Volume is locked or read-only
  2566.         paramErr            -50        Volume doesn't support this function
  2567.         afpAccessDenied        -5000    User does not have the correct access
  2568.                                     to the directory
  2569.         afpObjectTypeErr    -5025    Object is a file, not a directory
  2570.     
  2571.     __________
  2572.     
  2573.     See also:    CopyDirectoryAccess
  2574. */
  2575.  
  2576. /*****************************************************************************/
  2577.  
  2578. pascal    OSErr    HMoveRenameCompat(short vRefNum,
  2579.                                   long srcDirID,
  2580.                                   ConstStr255Param srcName,
  2581.                                   long dstDirID,
  2582.                                   StringPtr dstpathName,
  2583.                                   StringPtr copyName);
  2584. /*    ¶ Move a file or directory and optionally rename it.
  2585.     The HMoveRenameCompat function moves a file or directory and optionally
  2586.     renames it.  The source and destination locations must be on the same
  2587.     volume. This routine works even if the volume doesn't support MoveRename.
  2588.     
  2589.     vRefNum        input:    Volume specification.
  2590.     srcDirID    input:    Source directory ID.
  2591.     srcName        input:    The source object name.
  2592.     dstDirID    input:    Destination directory ID.
  2593.     dstName        input:    Pointer to destination directory name, or
  2594.                         nil when dstDirID specifies a directory.
  2595.     copyName    input:    Points to the new name if the object is to be
  2596.                         renamed or nil if the object isn't to be renamed.
  2597.     
  2598.     Result Codes
  2599.         noErr                0        No error
  2600.         dirFulErr            -33        File directory full
  2601.         dskFulErr            -34        Disk is full
  2602.         nsvErr                -35        Volume not found
  2603.         ioErr                -36        I/O error
  2604.         bdNamErr            -37        Bad filename or attempt to move into
  2605.                                     a file
  2606.         fnfErr                -43        Source file or directory not found
  2607.         wPrErr                -44        Hardware volume lock
  2608.         fLckdErr            -45        File is locked
  2609.         vLckdErr            -46        Destination volume is read-only
  2610.         fBsyErr                -47        File busy, directory not empty, or
  2611.                                     working directory control block open
  2612.         dupFNErr            -48        Destination already exists
  2613.         paramErr            -50        Volume doesn't support this function,
  2614.                                     no default volume, or source and
  2615.         volOfflinErr        -53        Volume is offline
  2616.         fsRnErr                -59        Problem during rename
  2617.         dirNFErr            -120    Directory not found or incomplete pathname
  2618.         badMovErr            -122    Attempted to move directory into
  2619.                                     offspring
  2620.         wrgVolTypErr        -123    Not an HFS volume (it's a MFS volume)
  2621.         notAFileErr            -1302    The pathname is nil, the pathname
  2622.                                     is empty, or the pathname cannot refer
  2623.                                     to a filename
  2624.         diffVolErr            -1303    Files on different volumes
  2625.         afpAccessDenied        -5000    The user does not have the right to
  2626.                                     move the file  or directory
  2627.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2628.         afpSameObjectErr    -5038    Source and destination files are the same
  2629.     
  2630.     __________
  2631.     
  2632.     See also:    FSpMoveRenameCompat
  2633. */
  2634.  
  2635. /*****************************************************************************/
  2636.  
  2637. pascal    OSErr    FSpMoveRenameCompat(const FSSpec *srcSpec,
  2638.                                     const FSSpec *dstSpec,
  2639.                                     StringPtr copyName);
  2640. /*    ¶ Move a file or directory and optionally rename it.
  2641.     The FSpMoveRenameCompat function moves a file or directory and optionally
  2642.     renames it.  The source and destination locations must be on the same
  2643.     volume. This routine works even if the volume doesn't support MoveRename.
  2644.     
  2645.     srcSpec        input:    An FSSpec record specifying the source object.
  2646.     dstSpec        input:    An FSSpec record specifying the destination
  2647.                         directory.
  2648.     copyName    input:    Points to the new name if the object is to be
  2649.                         renamed or nil if the object isn't to be renamed.
  2650.     
  2651.     Result Codes
  2652.         noErr                0        No error
  2653.         dirFulErr            -33        File directory full
  2654.         dskFulErr            -34        Disk is full
  2655.         nsvErr                -35        Volume not found
  2656.         ioErr                -36        I/O error
  2657.         bdNamErr            -37        Bad filename or attempt to move into
  2658.                                     a file
  2659.         fnfErr                -43        Source file or directory not found
  2660.         wPrErr                -44        Hardware volume lock
  2661.         fLckdErr            -45        File is locked
  2662.         vLckdErr            -46        Destination volume is read-only
  2663.         fBsyErr                -47        File busy, directory not empty, or
  2664.                                     working directory control block open
  2665.         dupFNErr            -48        Destination already exists
  2666.         paramErr            -50        Volume doesn't support this function,
  2667.                                     no default volume, or source and
  2668.         volOfflinErr        -53        Volume is offline
  2669.         fsRnErr                -59        Problem during rename
  2670.         dirNFErr            -120    Directory not found or incomplete pathname
  2671.         badMovErr            -122    Attempted to move directory into
  2672.                                     offspring
  2673.         wrgVolTypErr        -123    Not an HFS volume (it's a MFS volume)
  2674.         notAFileErr            -1302    The pathname is nil, the pathname
  2675.                                     is empty, or the pathname cannot refer
  2676.                                     to a filename
  2677.         diffVolErr            -1303    Files on different volumes
  2678.         afpAccessDenied        -5000    The user does not have the right to
  2679.                                     move the file  or directory
  2680.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2681.         afpSameObjectErr    -5038    Source and destination files are the same
  2682.     
  2683.     __________
  2684.     
  2685.     See also:    HMoveRenameCompat
  2686. */
  2687.  
  2688. /*****************************************************************************/
  2689.  
  2690. pascal    void    BuildAFPVolMountInfo(short theFlags,
  2691.                                      char theNBPInterval,
  2692.                                      char theNBPCount,
  2693.                                      short theUAMType,
  2694.                                      Str31 theZoneName,
  2695.                                      Str31 theServerName,
  2696.                                      Str27 theVolName,
  2697.                                      Str31 theUserName,
  2698.                                      Str8 theUserPassWord,
  2699.                                      Str8 theVolPassWord,
  2700.                                      MyAFPVolMountInfoPtr theAFPInfo);
  2701. /*    ¶ Initialize the fields of an AFPVolMountInfo record.
  2702.     The BuildAFPVolMountInfo function initializes the fields of an
  2703.     AFPVolMountInfo record for use before using that record to call
  2704.     the VolumeMount function.
  2705.     
  2706.     theFlags        input:    The AFP mounting flags. 0 = normal mount;
  2707.                             set bit 0 to inhibit greeting messages.
  2708.     theNBPInterval    input:    The interval used for VolumeMount's
  2709.                             NBP Lookup call. 7 is a good choice.
  2710.     theNBPCount        input:    The retry count used for VolumeMount's
  2711.                             NBP Lookup call. 5 is a good choice.
  2712.     theUAMType        input:    The user authentication method to use.
  2713.     theZoneName        input:    The AppleTalk zone name of the server.
  2714.     theServerName    input:    The AFP server name.
  2715.     theVolName        input:    The AFP volume name.
  2716.     theUserName        input:    The user name (zero length Pascal string for
  2717.                             guest).
  2718.     theUserPassWord    input:    The user password (zero length Pascal string
  2719.                             if no user password)
  2720.     theVolPassWord    input:    The volume password (zero length Pascal string
  2721.                             if no volume password)
  2722.     theAFPInfo        input:    Pointer to AFPVolMountInfo record to
  2723.                             initialize.
  2724.  
  2725.     __________
  2726.     
  2727.     Also see:    GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
  2728.                 RetrieveAFPVolMountInfo
  2729. */
  2730.  
  2731. /*****************************************************************************/
  2732.  
  2733. pascal    OSErr    RetrieveAFPVolMountInfo(AFPVolMountInfoPtr theAFPInfo,
  2734.                                         short *theFlags,
  2735.                                         short *theUAMType,
  2736.                                         StringPtr theZoneName,
  2737.                                         StringPtr theServerName,
  2738.                                         StringPtr theVolName,
  2739.                                         StringPtr theUserName);
  2740. /*    ¶ Retrieve the AFP mounting information from an AFPVolMountInfo record.
  2741.     The RetrieveAFPVolMountInfo function retrieves the AFP mounting
  2742.     information returned in an AFPVolMountInfo record by the
  2743.     GetVolMountInfo function.
  2744.     
  2745.     theAFPInfo        input:    Pointer to AFPVolMountInfo record that contains
  2746.                             the AFP mounting information.
  2747.     theFlags        output:    The AFP mounting flags. 0 = normal mount;
  2748.                             if bit 0 is set, greeting meesages were inhibited.
  2749.     theUAMType        output:    The user authentication method used.
  2750.     theZoneName        output:    The AppleTalk zone name of the server.
  2751.     theServerName    output:    The AFP server name.
  2752.     theVolName        output:    The AFP volume name.
  2753.     theUserName        output:    The user name (zero length Pascal string for
  2754.                             guest).
  2755.     
  2756.     Result Codes
  2757.         noErr                0        No error
  2758.         paramErr            -50        media field in AFP mounting information
  2759.                                     was not AppleShareMediaType
  2760.     
  2761.     __________
  2762.     
  2763.     Also see:    GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
  2764.                 BuildAFPVolMountInfo
  2765. */
  2766.  
  2767. /*****************************************************************************/
  2768.  
  2769. pascal    OSErr    GetUGEntries(short objType,
  2770.                              UGEntryPtr entries,
  2771.                              long reqEntryCount,
  2772.                              long *actEntryCount,
  2773.                              long *objID);
  2774. /*    ¶ Retrieve a list of user or group entries from the local file server.
  2775.     The GetUGEntries functions retrieves a list of user or group entries
  2776.     from the local file server.
  2777.  
  2778.     objType            input:    The object type: -1 = group; 0 = user
  2779.     UGEntries        input:    Pointer to array of UGEntry records where the list
  2780.                             is returned.
  2781.     reqEntryCount    input:    The number of elements in the UGEntries array.
  2782.     actEntryCount    output:    The number of entries returned.
  2783.     objID            input:    The current index position. Set to 0 to start with
  2784.                             the first entry.
  2785.                     output:    The index position to get the next entry. Pass this
  2786.                             value the next time you call GetUGEntries to start
  2787.                             where you left off.
  2788.     
  2789.     Result Codes
  2790.         noErr                0        No error    
  2791.         fnfErr                -43        No more users or groups    
  2792.         paramErr            -50        Function not supported; or, ioObjID is
  2793.                                     negative    
  2794.  
  2795.     __________
  2796.     
  2797.     Also see:    GetUGEntry
  2798. */
  2799.  
  2800. /*****************************************************************************/
  2801.  
  2802. #ifdef __cplusplus
  2803. }
  2804. #endif
  2805.  
  2806. #ifndef __COMPILINGMOREFILES
  2807. #undef pascal
  2808. #endif
  2809.  
  2810. #endif    /* __MOREFILESEXTRAS__ */
  2811.